Skip to content

Commit

Permalink
build: CI for macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
mhx committed Aug 13, 2024
1 parent 1daa729 commit f7bc2d9
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ permissions:

jobs:
windows:
if: false
runs-on:
- self-hosted
- Windows
Expand Down Expand Up @@ -137,6 +138,7 @@ jobs:
dwarfs-linux-build-arch
linux-src:
if: false
needs: package-source

strategy:
Expand Down Expand Up @@ -232,6 +234,7 @@ jobs:
dwarfs-linux-build-${{ matrix.dist }}
linux-git:
if: false
strategy:
matrix:
arch:
Expand Down Expand Up @@ -400,3 +403,45 @@ jobs:
if-no-files-found: error
compression-level: 0
if: ${{ endsWith(matrix.build_type, '-static') }}

macos:
needs: package-source

runs-on:
- self-hosted
- macOS

strategy:
matrix:
arch:
- ARM64
build_mode:
- Release
- Debug

steps:
- name: Unpack Source Tarball
run: |
rm -rf dwarfs-*/
rm -f dwarfs-source-*.tar.zst
rm -f dwarfs
tar xf /Volumes/opensource/artifacts/dwarfs/cache/dwarfs-source-${{ github.run_number }}.tar.zst
ln -s dwarfs-* dwarfs
- name: Configure Full Build
run: |
cmake -B${{ runner.temp }}/build-full -S${{ runner.workspace }}/dwarfs/dwarfs -GNinja -DCMAKE_BUILD_TYPE=${{ matrix.build_mode }} -DWITH_TESTS=ON -DWITH_BENCHMARKS=ON -DWITH_PXATTR=ON
- name: Run Build
run: |
cmake --build ${{ runner.temp }}/build-full
- name: Run Test
run: |
ctest --test-dir ${{ runner.temp }}/build-full --output-on-failure -j
- name: Cleanup
run: |
rm -rf dwarfs-*/
rm -f dwarfs-source-*.tar.zst
rm -f dwarfs

0 comments on commit f7bc2d9

Please sign in to comment.