Skip to content

Commit

Permalink
small CI workflow updates
Browse files Browse the repository at this point in the history
  • Loading branch information
rfomin committed Sep 5, 2024
1 parent 2f7e6cd commit a95d355
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ jobs:
with:
version: 18
step-summary: true
files-changed-only: false
files-changed-only: true
style: '' # disable clang-format checks.
tidy-checks: >-
-*
Expand Down
46 changes: 25 additions & 21 deletions .github/workflows/packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,29 @@ jobs:
triplet: x64-linux-dynamic-release
artifact-name: AppImage
artifact-path: build/*.appimage
extra-options: -DCMAKE_INSTALL_PREFIX=/usr

- name: MSVC x64
os: windows-latest
arch: x64
triplet: x64-windows-static-release
artifact-name: Win-64
artifact-path: build/*.zip
extra-options: >-
-DCMAKE_POLICY_DEFAULT_CMP0091=NEW
-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded
-DCMAKE_IGNORE_PATH="C:/Strawberry/perl/bin;C:/Strawberry/c/lib"
- name: MSVC x86
os: windows-latest
arch: x86
triplet: x86-windows-static-release
artifact-name: Win-32
artifact-path: build/*.zip
extra-options: >-
-DCMAKE_POLICY_DEFAULT_CMP0091=NEW
-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded
-DCMAKE_IGNORE_PATH="C:/Strawberry/perl/bin;C:/Strawberry/c/lib"
steps:
- uses: actions/checkout@v4
Expand All @@ -65,35 +74,29 @@ jobs:
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- name: Update vcpkg
- name: Setup vcpkg
shell: bash
run: |
echo "VCPKG_ROOT=${VCPKG_INSTALLATION_ROOT}" >> $GITHUB_ENV
- name: Update vcpkg (Linux)
if: runner.os == 'Linux'
run: |
cd "$VCPKG_INSTALLATION_ROOT"
git stash
git pull
./bootstrap-vcpkg.sh
- name: Configure (Linux)
if: runner.os == 'Linux'
- name: Configure
shell: bash
run: |
cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release \
-DENABLE_WERROR=ON -DENABLE_HARDENING=ON -DENABLE_LTO=ON \
-DCMAKE_TOOLCHAIN_FILE="$VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake" \
-DVCPKG_OVERLAY_TRIPLETS="cmake/triplets" \
-DVCPKG_TARGET_TRIPLET=${{ matrix.config.triplet }} \
-DCMAKE_INSTALL_PREFIX=/usr
- name: Configure (Windows)
if: runner.os == 'Windows'
run: |
cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release `
-DENABLE_WERROR=ON -DENABLE_LTO=ON `
-DCMAKE_TOOLCHAIN_FILE="${env:VCPKG_INSTALLATION_ROOT}/scripts/buildsystems/vcpkg.cmake" `
-DVCPKG_OVERLAY_TRIPLETS="cmake/triplets" `
-DVCPKG_TARGET_TRIPLET=${{ matrix.config.triplet }} `
-DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded `
-DCMAKE_IGNORE_PATH="C:/Strawberry/perl/bin;C:/Strawberry/c/lib"
run: >-
cmake -B build -G Ninja
-DCMAKE_BUILD_TYPE=Release
-DENABLE_WERROR=ON -DENABLE_HARDENING=ON -DENABLE_LTO=ON
-DCMAKE_TOOLCHAIN_FILE="${{ env.VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake"
-DVCPKG_OVERLAY_TRIPLETS="cmake/triplets"
-DVCPKG_TARGET_TRIPLET=${{ matrix.config.triplet }}
${{ matrix.config.extra-options }}
- name: Build
run: cmake --build build --config "Release"
Expand Down Expand Up @@ -125,6 +128,7 @@ jobs:
path: ${{ matrix.config.artifact-path }}

- name: Extract Version Number
if: ${{ contains(github.ref, 'tags') }}
shell: bash
run: echo "VERSION=${GITHUB_REF##*_}" >> $GITHUB_ENV

Expand Down

0 comments on commit a95d355

Please sign in to comment.