Skip to content

Commit

Permalink
Merge pull request #65 from nazar-pc/skip-gtk4-build-on-cache-hit
Browse files Browse the repository at this point in the history
Skip GTK4 building in CI in case of cache hit
  • Loading branch information
nazar-pc authored Dec 22, 2023
2 parents 8f6433f + f5b9813 commit 2443665
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,9 @@ jobs:

- name: Configure GTK4 cache (Windows)
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # @v3.3.2
id: cache
with:
path: C:\gtk-build
path: C:\gtk-build\gtk\x64\release
key: ${{ runner.os }}-gtk4
if: runner.os == 'Windows'

Expand All @@ -67,7 +68,7 @@ jobs:
run: |
Move-Item "C:\Program Files\Git\usr\bin" "C:\Program Files\Git\usr\notbin"
Move-Item "C:\Program Files\Git\bin" "C:\Program Files\Git\notbin"
if: runner.os == 'Windows'
if: runner.os == 'Windows' && steps.cache.outputs.cache-hit != 'true'

- name: Install GTK4 (Windows)
run: |
Expand All @@ -86,14 +87,14 @@ jobs:
Get-Content actual-dlls.log
Throw "Actual DLLs do not match expected"
}
if: runner.os == 'Windows'
if: runner.os == 'Windows' && steps.cache.outputs.cache-hit != 'true'

# TODO: This is a workaround for https://github.com/wingtk/gvsbuild/issues/984, remove once fixed upstream
- name: Restore git binary (Windows)
run: |
Move-Item "C:\Program Files\Git\usr\notbin" "C:\Program Files\Git\usr\bin"
Move-Item "C:\Program Files\Git\notbin" "C:\Program Files\Git\bin"
if: runner.os == 'Windows'
if: runner.os == 'Windows' && steps.cache.outputs.cache-hit != 'true'

# On macOS, we need a proper Clang version, not Apple's custom version without wasm32 support
# TODO: on macOS, the consensus/domain runtime build is not compatible with LLVM 15.0.7 and
Expand Down
18 changes: 10 additions & 8 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,9 @@ jobs:

- name: Configure GTK4 cache (Windows)
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # @v3.3.2
id: cache
with:
path: C:\gtk-build
path: C:\gtk-build\gtk\x64\release
key: ${{ runner.os }}-gtk4
if: runner.os == 'Windows'

Expand All @@ -84,7 +85,7 @@ jobs:
run: |
Move-Item "C:\Program Files\Git\usr\bin" "C:\Program Files\Git\usr\notbin"
Move-Item "C:\Program Files\Git\bin" "C:\Program Files\Git\notbin"
if: runner.os == 'Windows'
if: runner.os == 'Windows' && steps.cache.outputs.cache-hit != 'true'

- name: Install GTK4 (Windows)
run: |
Expand All @@ -103,14 +104,14 @@ jobs:
Get-Content actual-dlls.log
Throw "Actual DLLs do not match expected"
}
if: runner.os == 'Windows'
if: runner.os == 'Windows' && steps.cache.outputs.cache-hit != 'true'

# TODO: This is a workaround for https://github.com/wingtk/gvsbuild/issues/984, remove once fixed upstream
- name: Restore git binary (Windows)
run: |
Move-Item "C:\Program Files\Git\usr\notbin" "C:\Program Files\Git\usr\bin"
Move-Item "C:\Program Files\Git\notbin" "C:\Program Files\Git\bin"
if: runner.os == 'Windows'
if: runner.os == 'Windows' && steps.cache.outputs.cache-hit != 'true'

# On macOS, we need a proper Clang version, not Apple's custom version without wasm32 support
# TODO: on macOS, the consensus/domain runtime build is not compatible with LLVM 15.0.7 and
Expand Down Expand Up @@ -177,8 +178,9 @@ jobs:

- name: Configure GTK4 cache (Windows)
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # @v3.3.2
id: cache
with:
path: C:\gtk-build
path: C:\gtk-build\gtk\x64\release
key: ${{ runner.os }}-gtk4
if: runner.os == 'Windows'

Expand All @@ -187,7 +189,7 @@ jobs:
run: |
Move-Item "C:\Program Files\Git\usr\bin" "C:\Program Files\Git\usr\notbin"
Move-Item "C:\Program Files\Git\bin" "C:\Program Files\Git\notbin"
if: runner.os == 'Windows'
if: runner.os == 'Windows' && steps.cache.outputs.cache-hit != 'true'

- name: Install GTK4 (Windows)
run: |
Expand All @@ -206,14 +208,14 @@ jobs:
Get-Content actual-dlls.log
Throw "Actual DLLs do not match expected"
}
if: runner.os == 'Windows'
if: runner.os == 'Windows' && steps.cache.outputs.cache-hit != 'true'

# TODO: This is a workaround for https://github.com/wingtk/gvsbuild/issues/984, remove once fixed upstream
- name: Restore git binary (Windows)
run: |
Move-Item "C:\Program Files\Git\usr\notbin" "C:\Program Files\Git\usr\bin"
Move-Item "C:\Program Files\Git\notbin" "C:\Program Files\Git\bin"
if: runner.os == 'Windows'
if: runner.os == 'Windows' && steps.cache.outputs.cache-hit != 'true'

# On macOS, we need a proper Clang version, not Apple's custom version without wasm32 support
# TODO: on macOS, the consensus/domain runtime build is not compatible with LLVM 15.0.7 and
Expand Down

0 comments on commit 2443665

Please sign in to comment.