Skip to content

Commit

Permalink
Merge branch 'trunk' into folderstructure
Browse files Browse the repository at this point in the history
  • Loading branch information
almarklein authored Sep 12, 2024
2 parents bf8c38c + 7656869 commit a02e173
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 6 deletions.
16 changes: 12 additions & 4 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ name: CD

env:
CACHE_SUFFIX: a
WGPU_ANDROID_NDK_VERSION: r27b # 27.1.12297006

on:
workflow_dispatch:
Expand Down Expand Up @@ -87,7 +88,7 @@ jobs:
target: i686-linux-android
setup_env: |
set -x
ANDROID_NDK_HOME=$ANDROID_HOME/ndk/27.0.12077973
ANDROID_NDK_HOME=$HOME/wgpu-deps/ndk/android-ndk-$WGPU_ANDROID_NDK_VERSION
CC=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin/i686-linux-android21-clang
echo "CC=$CC" >> $GITHUB_ENV
Expand All @@ -101,7 +102,7 @@ jobs:
target: x86_64-linux-android
setup_env: |
set -x
ANDROID_NDK_HOME=$ANDROID_HOME/ndk/27.0.12077973
ANDROID_NDK_HOME=$HOME/wgpu-deps/ndk/android-ndk-$WGPU_ANDROID_NDK_VERSION
CC=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin/x86_64-linux-android21-clang
echo "CC=$CC" >> $GITHUB_ENV
Expand All @@ -115,7 +116,7 @@ jobs:
target: aarch64-linux-android
setup_env: |
set -x
ANDROID_NDK_HOME=$ANDROID_HOME/ndk/27.0.12077973
ANDROID_NDK_HOME=$HOME/wgpu-deps/ndk/android-ndk-$WGPU_ANDROID_NDK_VERSION
CC=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android21-clang
echo "CC=$CC" >> $GITHUB_ENV
Expand All @@ -129,7 +130,7 @@ jobs:
target: armv7-linux-androideabi
setup_env: |
set -x
ANDROID_NDK_HOME=$ANDROID_HOME/ndk/27.0.12077973
ANDROID_NDK_HOME=$HOME/wgpu-deps/ndk/android-ndk-$WGPU_ANDROID_NDK_VERSION
CC=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi21-clang
echo "CC=$CC" >> $GITHUB_ENV
Expand Down Expand Up @@ -158,6 +159,13 @@ jobs:
uses: Swatinem/rust-cache@v2
with:
key: build-${{ matrix.TARGET }}-${{ matrix.CACHE_SUFFIX }}
- name: Setup Android NDK
run: |
mkdir -p $HOME/wgpu-deps/ndk
cd $HOME/wgpu-deps/ndk
curl -LO https://dl.google.com/android/repository/android-ndk-$WGPU_ANDROID_NDK_VERSION-linux.zip
unzip android-ndk-$WGPU_ANDROID_NDK_VERSION-linux.zip
rm android-ndk-$WGPU_ANDROID_NDK_VERSION-linux.zip
- name: Setup Environment
run: ${{ matrix.setup_env }}
- name: Build
Expand Down
13 changes: 11 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: full
CACHE_SUFFIX: a
WGPU_ANDROID_NDK_VERSION: r27b # 27.1.12297006

jobs:
# A build that does some "meta" checks on the code integrity where the Rust compiler can't.
Expand Down Expand Up @@ -83,7 +84,7 @@ jobs:
target: aarch64-linux-android
setup_env: |
set -x
ANDROID_NDK_HOME=$ANDROID_HOME/ndk/27.0.12077973
ANDROID_NDK_HOME=$HOME/wgpu-deps/ndk/android-ndk-$WGPU_ANDROID_NDK_VERSION
CC=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android21-clang
echo "CC=$CC" >> $GITHUB_ENV
Expand All @@ -98,7 +99,7 @@ jobs:
target: armv7-linux-androideabi
setup_env: |
set -x
ANDROID_NDK_HOME=$ANDROID_HOME/ndk/27.0.12077973
ANDROID_NDK_HOME=$HOME/wgpu-deps/ndk/android-ndk-$WGPU_ANDROID_NDK_VERSION
CC=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi21-clang
echo "CC=$CC" >> $GITHUB_ENV
Expand Down Expand Up @@ -126,6 +127,14 @@ jobs:
uses: Swatinem/rust-cache@v2
with:
key: clippy-${{ matrix.target }}-${{ env.CACHE_SUFFIX }}
- if: contains(matrix.target, 'android')
name: Setup Android NDK
run: |
mkdir -p $HOME/wgpu-deps/ndk
cd $HOME/wgpu-deps/ndk
curl -LO https://dl.google.com/android/repository/android-ndk-$WGPU_ANDROID_NDK_VERSION-linux.zip
unzip android-ndk-$WGPU_ANDROID_NDK_VERSION-linux.zip
rm android-ndk-$WGPU_ANDROID_NDK_VERSION-linux.zip
- name: Setup Environment
run: ${{ matrix.setup_env }}
- name: Run clippy
Expand Down

0 comments on commit a02e173

Please sign in to comment.