Skip to content

Commit

Permalink
ci: fix cross build
Browse files Browse the repository at this point in the history
  • Loading branch information
hans00 committed Nov 18, 2024
1 parent d7f6105 commit 52a9822
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ jobs:
run: |
docker run --rm \
-v $(pwd):/work \
-e ARCH=arm64 \
dockcross/linux-arm64:latest \
bash -c "./scripts/prepare-linux.sh && ./scripts/build-linux.sh"
- name: Build (macOS)
Expand Down
4 changes: 3 additions & 1 deletion scripts/build-linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ set -e

# General

if [ $(uname -m) == "x86_64" ]; then
ARCH=${ARCH:-${1:-$(uname -m)}}

if [ $ARCH == "x86_64" ]; then
yarn clean && yarn build-native
yarn clean && yarn build-native --CDLLAMA_VULKAN=1 --CDVARIANT=vulkan
else
Expand Down
4 changes: 3 additions & 1 deletion scripts/prepare-linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ function run_as_root() {

export DEBIAN_FRONTEND=noninteractive

if [ $(uname -m) == "x86_64" ]; then
ARCH=${ARCH:-${1:-$(uname -m)}}

if [ $ARCH == "x86_64" ]; then
DISTRO=$(lsb_release -c -s)
wget -qO- https://packages.lunarg.com/lunarg-signing-key-pub.asc | run_as_root tee /etc/apt/trusted.gpg.d/lunarg.asc
run_as_root wget -qO /etc/apt/sources.list.d/lunarg-vulkan-1.3.280-$DISTRO.list https://packages.lunarg.com/vulkan/1.3.280/lunarg-vulkan-1.3.280-$DISTRO.list
Expand Down

0 comments on commit 52a9822

Please sign in to comment.