Skip to content

Commit

Permalink
Test iOS cross-compile in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
kelson42 committed Nov 11, 2023
1 parent 00032ad commit f08aeeb
Showing 1 changed file with 22 additions and 3 deletions.
25 changes: 22 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,17 @@ on:

jobs:
macOS:
runs-on: macos-13
strategy:
fail-fast: false
matrix:
os:
- macos-13
target:
- native_dyn
- iOS_arm64
- iOS_x86_64
runs-on: ${{ matrix.os }}

env:
HOME: /Users/runner
steps:
Expand All @@ -29,15 +39,24 @@ jobs:
run: |
wget -O- https://tmp.kiwix.org/ci/${{env.ARCHIVE_NAME}} | tar -xJ -C ${{env.HOME}}
- name: Compile source code
- name: Compile
env:
PKG_CONFIG_PATH: ${{env.HOME}}/BUILD_native_dyn/INSTALL/lib/pkgconfig
CPPFLAGS: -I${{env.HOME}}/BUILD_native_dyn/INSTALL/include
shell: bash
run: |
meson . build --default-library=shared -Db_coverage=true
MESON_OPTION="--default-library=shared -Db_coverage=true"
MESON_CROSSFILE="$HOME/BUILD_${{matrix.target}}/meson_cross_file.txt"
if [[ ! "${{matrix.target}}" =~ native_.* ]]; then
MESON_OPTION="$MESON_OPTION --cross-file $MESON_CROSSFILE -Dstatic-linkage=true"
cat $MESON_CROSSFILE
fi
export PKG_CONFIG_PATH=$HOME/BUILD_${{matrix.target}}/INSTALL/lib/pkgconfig
meson . build ${MESON_OPTION}
ninja -C build
- name: Test libkiwix
if: startsWith(matrix.target, 'native_')
env:
SKIP_BIG_MEMORY_TEST: 1
LD_LIBRARY_PATH: ${{env.HOME}}/BUILD_native_dyn/INSTALL/lib:${{env.HOME}}/BUILD_native_dyn/INSTALL/lib64
Expand Down

0 comments on commit f08aeeb

Please sign in to comment.