Skip to content

Commit

Permalink
build: make macOS build job more ccache friendly
Browse files Browse the repository at this point in the history
  • Loading branch information
mhx committed Aug 13, 2024
1 parent 0a5a27b commit dda3b02
Showing 1 changed file with 29 additions and 15 deletions.
44 changes: 29 additions & 15 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -441,66 +441,80 @@ jobs:
- 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_PXATTR=ON ${{ matrix.config.cmake_args }}
rm -rf ${{ runner.temp }}/build
cmake --fresh -B${{ runner.temp }}/build -S${{ runner.workspace }}/dwarfs/dwarfs -GNinja -DCMAKE_BUILD_TYPE=${{ matrix.build_mode }} -DWITH_TESTS=ON -DWITH_PXATTR=ON ${{ matrix.config.cmake_args }}
- name: Run Full Build
run: |
cmake --build ${{ runner.temp }}/build-full
cmake --build ${{ runner.temp }}/build
- name: Run Full Test
run: |
ctest --test-dir ${{ runner.temp }}/build-full --output-on-failure -j
ctest --test-dir ${{ runner.temp }}/build --output-on-failure -j
- name: Cleanup
run: |
cmake --build ${{ runner.temp }}/build --target realclean
- name: Configure Library Build
run: |
cmake -B${{ runner.temp }}/build-library -S${{ runner.workspace }}/dwarfs/dwarfs -GNinja -DCMAKE_BUILD_TYPE=${{ matrix.build_mode }} -DWITH_TESTS=ON -DWITH_LIBDWARFS=ON -DWITH_TOOLS=OFF -DWITH_FUSE_DRIVER=OFF ${{ matrix.config.cmake_args }}
cmake --fresh -B${{ runner.temp }}/build -S${{ runner.workspace }}/dwarfs/dwarfs -GNinja -DCMAKE_BUILD_TYPE=${{ matrix.build_mode }} -DWITH_TESTS=ON -DWITH_LIBDWARFS=ON -DWITH_TOOLS=OFF -DWITH_FUSE_DRIVER=OFF ${{ matrix.config.cmake_args }}
- name: Run Library Build
run: |
cmake --build ${{ runner.temp }}/build-library
cmake --build ${{ runner.temp }}/build
- name: Run Library Test
run: |
ctest --test-dir ${{ runner.temp }}/build-library --output-on-failure -j
ctest --test-dir ${{ runner.temp }}/build --output-on-failure -j
- name: Install Library
run: |
cmake --install ${{ runner.temp }}/build-library --prefix ${{ runner.temp }}/install
cmake --install ${{ runner.temp }}/build --prefix ${{ runner.temp }}/install
- name: Cleanup
run: |
cmake --build ${{ runner.temp }}/build --target realclean
- name: Configure Tools Build
run: |
cmake -B${{ runner.temp }}/build-tools -S${{ runner.workspace }}/dwarfs/dwarfs -GNinja -DCMAKE_BUILD_TYPE=${{ matrix.build_mode }} -DWITH_TESTS=ON -DWITH_LIBDWARFS=OFF -DWITH_TOOLS=ON -DWITH_FUSE_DRIVER=OFF ${{ matrix.config.cmake_args }} -DCMAKE_PREFIX_PATH=${{ runner.temp }}/install
cmake --fresh -B${{ runner.temp }}/build -S${{ runner.workspace }}/dwarfs/dwarfs -GNinja -DCMAKE_BUILD_TYPE=${{ matrix.build_mode }} -DWITH_TESTS=ON -DWITH_LIBDWARFS=OFF -DWITH_TOOLS=ON -DWITH_FUSE_DRIVER=OFF ${{ matrix.config.cmake_args }} -DCMAKE_PREFIX_PATH=${{ runner.temp }}/install
- name: Run Tools Build
run: |
cmake --build ${{ runner.temp }}/build-tools
cmake --build ${{ runner.temp }}/build
- name: Run Tools Test
run: |
ctest --test-dir ${{ runner.temp }}/build-tools --output-on-failure -j
ctest --test-dir ${{ runner.temp }}/build --output-on-failure -j
- name: Install Tools
run: |
cmake --install ${{ runner.temp }}/build-tools --prefix ${{ runner.temp }}/install
cmake --install ${{ runner.temp }}/build --prefix ${{ runner.temp }}/install
- name: Cleanup
run: |
cmake --build ${{ runner.temp }}/build --target realclean
- name: Configure FUSE Driver Build
run: |
cmake -B${{ runner.temp }}/build-driver -S${{ runner.workspace }}/dwarfs/dwarfs -GNinja -DCMAKE_BUILD_TYPE=${{ matrix.build_mode }} -DWITH_TESTS=ON -DWITH_LIBDWARFS=OFF -DWITH_TOOLS=OFF -DWITH_FUSE_DRIVER=ON ${{ matrix.config.cmake_args }} -DCMAKE_PREFIX_PATH=${{ runner.temp }}/install
cmake --fresh -B${{ runner.temp }}/build -S${{ runner.workspace }}/dwarfs/dwarfs -GNinja -DCMAKE_BUILD_TYPE=${{ matrix.build_mode }} -DWITH_TESTS=ON -DWITH_LIBDWARFS=OFF -DWITH_TOOLS=OFF -DWITH_FUSE_DRIVER=ON ${{ matrix.config.cmake_args }} -DCMAKE_PREFIX_PATH=${{ runner.temp }}/install
- name: Run FUSE Driver Build
run: |
cmake --build ${{ runner.temp }}/build-driver
cmake --build ${{ runner.temp }}/build
- name: Run FUSE Driver Test
run: |
ctest --test-dir ${{ runner.temp }}/build-driver --output-on-failure -j
ctest --test-dir ${{ runner.temp }}/build --output-on-failure -j
- name: Install FUSE Driver
run: |
cmake --install ${{ runner.temp }}/build-driver --prefix ${{ runner.temp }}/install
cmake --install ${{ runner.temp }}/build --prefix ${{ runner.temp }}/install
- name: Cleanup
run: |
cmake --build ${{ runner.temp }}/build --target realclean
rm -rf dwarfs-*/
rm -f dwarfs-source-*.tar.zst
rm -f dwarfs

0 comments on commit dda3b02

Please sign in to comment.