From fa4871fbec9e03e1a7601aecc57be1869430e89a Mon Sep 17 00:00:00 2001 From: Marcus Holland-Moritz Date: Tue, 13 Aug 2024 15:13:57 +0200 Subject: [PATCH] build: CI for macOS --- .github/workflows/build.yml | 48 +++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fb284d234..e14df57fe 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -14,6 +14,7 @@ permissions: jobs: windows: + if: false runs-on: - self-hosted - Windows @@ -137,6 +138,7 @@ jobs: dwarfs-linux-build-arch linux-src: + if: false needs: package-source strategy: @@ -232,6 +234,7 @@ jobs: dwarfs-linux-build-${{ matrix.dist }} linux-git: + if: false strategy: matrix: arch: @@ -400,3 +403,48 @@ 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 + shell: cmd + run: | + cmake -B${{ runner.temp }}/build-full -S${{ runner.workspace }}/dwarfs -GNinja -DCMAKE_BUILD_TYPE=${{ matrix.build_mode }} -DWITH_TESTS=ON -DWITH_BENCHMARKS=ON -DWITH_PXATTR=ON + + - name: Run Build + shell: cmd + run: | + cmake --build ${{ runner.temp }}/build-full + + - name: Run Test + shell: cmd + 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