- uses: actions/setup-python@v2
with:
python-version: '3.7'
+ - name: Install Ninja
+ run: brew install ninja
+ - name: Cache dependencies
+ id: cache-deps
+ uses: actions/cache@v3
+ env:
+ cache-name: cache-macos-latest
+ with:
+ path: |
+ external/Vulkan-Headers/build/install
+ external/MoltenVK
+ external/Vulkan-Loader/build/install
+ key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.config }}-${{ hashfiles('scripts/known_good.json') }}
- - name: Fetch and install headers
- run: python scripts/update_deps.py --dir external
+ - name: Fetch/Update dependencies
+ run: python scripts/update_deps.py --dir external --skip-existing-install
- name: Generate build files
- run: cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=${{matrix.config}} -Cexternal/helper.cmake
+ run: cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=${{matrix.config}} -Cexternal/helper.cmake -G "Ninja"
env:
# Specify the minimum version of macOS on which the target binaries are to be deployed.
# https://cmake.org/cmake/help/latest/envvar/MACOSX_DEPLOYMENT_TARGET.html
MACOSX_DEPLOYMENT_TARGET: 10.12
- name: Build the tools
- run: make -C build
+ run: cmake --build build
- name: Verify generated source files
run: python scripts/generate_source.py --verify external/Vulkan-Headers/registry
help="Delete install directory before building",
default=False)
parser.add_argument(
+ '--skip-existing-install',
+ dest='skip_existing_install',
+ action='store_true',
+ help="Skip build if install directory exists",
+ default=False)
+ parser.add_argument(
'--arch',
dest='arch',
choices=['32', '64', 'x86', 'x64', 'win32', 'win64'],
if not repo.on_build_platform:
continue
+ # Skip building the repo if its install directory already exists
+ # and requested via an option. This is useful for cases where the
+ # install directory is restored from a cache that is known to be up
+ # to date.
+ if args.skip_existing_install and os.path.isdir(repo.install_dir):
+ print('Skipping build for repo {n} due to existing install directory'.format(n=repo.name))
+ continue
+
# Skip test-only repos if the --tests option was not passed in
if repo.IsOptional(args.optional):
continue