Skip to content

Commit

Permalink
update ci
Browse files Browse the repository at this point in the history
  • Loading branch information
sunli829 committed Apr 18, 2024
1 parent db23a9d commit 87b1cfc
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 4 deletions.
32 changes: 28 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,19 @@ jobs:
run: |
rustup target install ${{ matrix.target }}
- name: Build
- name: Build C
working-directory: c
run: |
cargo rustc --crate-type=staticlib --target --target ${{ matrix.target }}
- name: Get CMake
uses: lukka/get-cmake@latest

- name: Build CPP
working-directory: cpp
run: |
cd c && cargo rustc --crate-type=staticlib --target --target ${{ matrix.target }}
mkdir cmake.build
cd cmake.build && cmake --toolchain ../static/toolchains/ios.cmake ../static && make
check-android-cpp-sdk:
needs:
Expand Down Expand Up @@ -305,10 +315,24 @@ jobs:
ndk-version: r26d
add-to-path: true

- name: Build
- name: Build C
working-directory: c
env:
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
CC: ${{ steps.setup-ndk.outputs.ndk-path }}/toolchains/llvm/prebuilt/linux-x86_64/bin/${{ matrix.settings.cc }}
AR: ${{ steps.setup-ndk.outputs.ndk-path }}/toolchains/llvm/prebuilt/linux-x86_64/bin/${{ matrix.settings.ar }}
run: |
cargo rustc --crate-type=staticlib --target ${{ matrix.settings.target }}
- name: Get CMake
uses: lukka/get-cmake@latest

- name: Build CPP
working-directory: cpp
env:
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
CC: ${{ steps.setup-ndk.outputs.ndk-path }}/toolchains/llvm/prebuilt/linux-x86_64/bin/${{ matrix.settings.cc }}
AR: ${{ steps.setup-ndk.outputs.ndk-path }}/toolchains/llvm/prebuilt/linux-x86_64/bin/${{ matrix.settings.ar }}
run: |
cd c && cargo rustc --crate-type=staticlib --target ${{ matrix.settings.target }}
mkdir cmake.build
cd cmake.build && cmake ../static && make
2 changes: 2 additions & 0 deletions cpp/static/toolchains/ios.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
set(CMAKE_SYSTEM_NAME Darwin)
set(CMAKE_SYSTEM_PROCESSOR arm)

0 comments on commit 87b1cfc

Please sign in to comment.