Skip to content

Commit

Permalink
gh-actions: jobs for each vcpkg triplet
Browse files Browse the repository at this point in the history
  • Loading branch information
luncliff committed Jul 21, 2024
1 parent 4b8bc45 commit 36919b0
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 9 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,48 @@ jobs:
--use_xnnpack \
--use_binskim_compliant_compile_flags
Vcpkg:
runs-on: macos-13
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ env.python_version }}
- uses: lukka/run-vcpkg@v11
with:
vcpkgGitCommitId: "1de2026f28ead93ff1773e6e680387643e914ea1" # 2024.07.12
runVcpkgInstall: false

- name: "Run build.py(x64-osx)"
run: |
python ./tools/ci_build/build.py \
--build_dir "build/x64-osx" \
--skip_submodule_sync \
--compile_no_warning_as_error \
--skip_tests \
--parallel \
--use_xcode --osx_arch x86_64 \
--use_vcpkg \
--cmake_extra_defines "CMAKE_TOOLCHAIN_FILE:FILEPATH=${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake" \
--cmake_extra_defines "VCPKG_TARGET_TRIPLET=x64-osx" \
--cmake_extra_defines "VCPKG_INSTALL_OPTIONS=--x-feature=tests"
shell: bash

- name: "Run build.py(arm64-osx)"
run: |
python ./tools/ci_build/build.py \
--build_dir "build/arm64-osx" \
--skip_submodule_sync \
--compile_no_warning_as_error \
--skip_tests \
--parallel \
--use_xcode --osx_arch arm64 \
--use_vcpkg \
--cmake_extra_defines "CMAKE_TOOLCHAIN_FILE:FILEPATH=${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake" \
--cmake_extra_defines "VCPKG_TARGET_TRIPLET=arm64-osx" \
--cmake_extra_defines "VCPKG_INSTALL_OPTIONS=--x-feature=tests"
shell: bash

Objective-C-StaticAnalysis:
runs-on: macos-14

Expand Down
33 changes: 24 additions & 9 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,24 +43,39 @@ jobs:
- name: Build code
run: python tools\ci_build\build.py --windows_sdk_version 10.0.22621.0 --enable_training --build_java --config Debug --build_dir D:\b --skip_submodule_sync --build_csharp --update --build --parallel --cmake_generator "Visual Studio 17 2022" --build_shared_lib --enable_pybind --use_cuda --cuda_home=${{ github.workspace }}\cuda_sdk\v12.2 --enable_cuda_profiling --cmake_extra_defines CMAKE_CUDA_ARCHITECTURES=75

Windows-Vcpkg:
Vcpkg:
runs-on: "windows-latest"
steps:
- uses: actions/checkout@v4
with:
submodules: false
- uses: actions/setup-python@v5
with:
python-version: '3.11.x'
architecture: 'x64'

- name: "Run build.py"
- name: "Run build.py(x64-windows)"
run: |
python tools\ci_build\build.py `
--build_dir "build/x64-windows" `
--skip_submodule_sync `
--compile_no_warning_as_error `
--skip_tests `
--parallel `
--use_vcpkg `
--cmake_extra_defines "CMAKE_TOOLCHAIN_FILE:FILEPATH=$env:VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake" `
--cmake_extra_defines "VCPKG_TARGET_TRIPLET=x64-windows" `
--cmake_extra_defines "VCPKG_INSTALL_OPTIONS=--x-feature=tests"
shell: pwsh

- name: "Run build.py(arm64-windows)"
run: |
python tools\ci_build\build.py `
--config Debug --build_dir "${{github.workspace}}/cmake_build" `
--skip_submodule_sync --skip_tests --compile_no_warning_as_error `
--cmake_generator "Visual Studio 17 2022" --build_shared_lib `
--vcpkg `
--cmake_extra_defines "CMAKE_TOOLCHAIN_FILE:FILEPATH=${{ env.VCPKG_INSTALLATION_ROOT }}\scripts\buildsystems\vcpkg.cmake" `
--build_dir "build/arm64-windows" --arm64 `
--skip_submodule_sync `
--compile_no_warning_as_error `
--skip_tests `
--parallel `
--use_vcpkg `
--cmake_extra_defines "CMAKE_TOOLCHAIN_FILE:FILEPATH=$env:VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake" `
--cmake_extra_defines "VCPKG_TARGET_TRIPLET=arm64-windows" `
--cmake_extra_defines "VCPKG_INSTALL_OPTIONS=--x-feature=tests"
shell: pwsh

0 comments on commit 36919b0

Please sign in to comment.