Skip to content

Commit

Permalink
ci: generate fewer cache
Browse files Browse the repository at this point in the history
  • Loading branch information
ArcticLampyrid committed Oct 23, 2024
1 parent 78f8095 commit 28c04bc
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 9 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ jobs:
include:
- rid: linux-x64
rust_target: x86_64-unknown-linux-gnu
vcpkg_host_triplet: 'x64-linux-release'
vcpkg_target_triplet: 'x64-linux-release'
os: ubuntu-24.04
qt_arch: gcc_64
- rid: win-x64
Expand All @@ -38,6 +40,10 @@ jobs:
- rid: macos-x64
osx_arch: x86_64
rust_target: x86_64-apple-darwin
# Even on ARM64 macOS, it's out of the box to use x64 tools.
# Using x64 tools avoids the need to build Qt twice,
# and despite the Rosetta 2 overhead, it still offers faster performance.
vcpkg_host_triplet: 'x64-osx-release'
vcpkg_target_triplet: 'x64-osx-release'
os: macos-latest

Expand Down Expand Up @@ -90,13 +96,13 @@ jobs:
with:
version: '6.2.0'
arch: ${{ matrix.qt_arch }}
cache: true

- name: Setup Rust toolchain
uses: moonrepo/setup-rust@v1
with:
channel: stable
targets: ${{ matrix.rust_target }}
cache: false
env:
GITHUB_TOKEN: ${{ github.token }}

Expand Down
19 changes: 11 additions & 8 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,13 @@ jobs:
with:
version: 6.6.3
arch: gcc_64
cache: true
cache-key-prefix: ${{ runner.os }}-qt

- name: Setup Rust toolchain
uses: moonrepo/setup-rust@v1
with:
channel: stable
cache: false
env:
GITHUB_TOKEN: ${{ github.token }}

Expand All @@ -98,12 +98,12 @@ jobs:
with:
path: |
${{ github.workspace }}/build/_deps
${{ github.workspace }}/build/lib
${{ github.workspace }}/build/*/cargo/build
!${{ github.workspace }}/build/*/cargo/build/**/incremental
${{ github.workspace }}/build/corrosion/**/target
!${{ github.workspace }}/build/corrosion/**/target/**/incremental
key: corrosion-linux-x64
key: corrosion-linux-x64-${{ github.run_id }}
restore-keys: corrosion-linux-x64-

- name: Setup CMake
uses: lukka/get-cmake@latest
Expand All @@ -122,11 +122,14 @@ jobs:

- if: matrix.build-mode == 'manual'
name: Build with CMake
uses: lukka/run-cmake@v10
with:
configurePreset: 'native'
buildPreset: 'native'
configurePresetAdditionalArgs: "['-DSPEED_UP_DEBUG_BUILD=ON']"
shell: pwsh
run: |
$additionalConfigureArgs = @()
$additionalConfigureArgs += "-DVCPKG_HOST_TRIPLET:STRING=x64-linux-release"
$additionalConfigureArgs += "-DVCPKG_TARGET_TRIPLET:STRING=x64-linux-release"
$additionalConfigureArgs += "-DSPEED_UP_DEBUG_BUILD=ON"
cmake --preset native @additionalConfigureArgs
cmake --build --preset native
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
Expand Down

0 comments on commit 28c04bc

Please sign in to comment.