Skip to content

Commit

Permalink
ci: Place dependency version on hashable files.
Browse files Browse the repository at this point in the history
  • Loading branch information
jrfonseca committed Dec 9, 2023
1 parent 185024c commit 64a92e1
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 21 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
path: |
downloads/*.7z
downloads/*.zip
key: ${{ runner.os }}-${{ matrix.target }}-mingw-12.2.0-win32-dbghelp-10.0.18362.1
key: ${{ runner.os }}-${{ hashFiles('ci/depedencies.ps1') }}
- run: Get-Host | Select-Object Version
- run: python -m pip install gcovr
- name: Build
Expand Down Expand Up @@ -75,7 +75,7 @@ jobs:
uses: actions/cache@v3
with:
path: downloads/*.xz
key: ${{ runner.os }}-llvm-mingw-20220906
key: ${{ runner.os }}-{{ hashFiles('ci/depedencies-clang.sh') }}
- run: sudo dpkg --add-architecture i386
# Workaround https://github.com/actions/virtual-environments/issues/4589
- run: |
Expand Down
13 changes: 6 additions & 7 deletions ci/build-clang.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,19 @@ xvfb_run() {
}


. ci/dependencies-clang.sh


#
# Download and setup llvm-ming
#

release=20220906
basename=llvm-mingw-$release-ucrt-ubuntu-18.04-x86_64
archive=$basename.tar.xz

mkdir -p downloads
test -f downloads/$archive || wget -q -O downloads/$archive https://github.com/mstorsjo/llvm-mingw/releases/download/$release/$archive
test -d downloads/$basename || tar -xJf downloads/$archive -C downloads
test -f downloads/$llvm_archive || wget -q -O downloads/$llvm_archive https://github.com/mstorsjo/llvm-mingw/releases/download/$llvm_release/$llvm_archive
test -d downloads/$llvm_basename || tar -xJf downloads/$llvm_archive -C downloads

rm -f downloads/llvm-mingw
ln -sf $basename downloads/llvm-mingw
ln -sf $llvm_basename downloads/llvm-mingw

export PATH="$PWD/downloads/llvm-mingw/bin:$PATH"

Expand Down
15 changes: 3 additions & 12 deletions ci/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,9 @@ function Exec {
}
}

$MINGW_64_URL = 'https://github.com/niXman/mingw-builds-binaries/releases/download/12.2.0-rt_v10-rev2/x86_64-12.2.0-release-win32-seh-msvcrt-rt_v10-rev2.7z'
$MINGW_32_URL = 'https://github.com/niXman/mingw-builds-binaries/releases/download/12.2.0-rt_v10-rev2/i686-12.2.0-release-win32-dwarf-msvcrt-rt_v10-rev2.7z'
$MINGW_64_SUM = 'dbe4de36401906f296c2752afd512891a227a787f3b9cf10115b409feaef39aa'
$MINGW_32_SUM = 'd76daf7a176f6e65ff75adc26efbadba89787bb14265696b94dce302cf1f8115'

$DBGHELP_64_URL = 'https://gist.githubusercontent.com/jrfonseca/55a9a0e0e228ad841032df1624da5e27/raw/8b5f0a1578be701128f09f886f9636389ae60268/dbghelp-win64.7z'
$DBGHELP_32_URL = 'https://gist.githubusercontent.com/jrfonseca/55a9a0e0e228ad841032df1624da5e27/raw/8b5f0a1578be701128f09f886f9636389ae60268/dbghelp-win32.7z'
$DBGHELP_64_SUM = '9bdc77e09a9ebdc8f810c46ed2b1171c048d6ebbe1b9ea1f927bfac66220dae5'
$DBGHELP_32_SUM = 'dfdf39857b76533adb0bffd9ef9d1bc7516280f810ecea6dd5c1b5ca97809706'

$NINJA_URL = 'https://github.com/ninja-build/ninja/releases/download/v1.11.1/ninja-win.zip'
$NINJA_SUM = '524b344a1a9a55005eaf868d991e090ab8ce07fa109f1820d40e74642e289abc'

. .\ci\dependencies.ps1


#
# Download and extract MinGW-w64 toolchain
Expand Down
3 changes: 3 additions & 0 deletions ci/dependencies-clang.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
llvm_release=20220906
llvm_basename=llvm-mingw-$llvm_release-ucrt-ubuntu-18.04-x86_64
llvm_archive=$llvm_basename.tar.xz
13 changes: 13 additions & 0 deletions ci/dependencies.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
$MINGW_64_URL = 'https://github.com/niXman/mingw-builds-binaries/releases/download/12.2.0-rt_v10-rev2/x86_64-12.2.0-release-win32-seh-msvcrt-rt_v10-rev2.7z'
$MINGW_32_URL = 'https://github.com/niXman/mingw-builds-binaries/releases/download/12.2.0-rt_v10-rev2/i686-12.2.0-release-win32-dwarf-msvcrt-rt_v10-rev2.7z'
$MINGW_64_SUM = 'dbe4de36401906f296c2752afd512891a227a787f3b9cf10115b409feaef39aa'
$MINGW_32_SUM = 'd76daf7a176f6e65ff75adc26efbadba89787bb14265696b94dce302cf1f8115'

$DBGHELP_64_URL = 'https://gist.githubusercontent.com/jrfonseca/55a9a0e0e228ad841032df1624da5e27/raw/8b5f0a1578be701128f09f886f9636389ae60268/dbghelp-win64.7z'
$DBGHELP_32_URL = 'https://gist.githubusercontent.com/jrfonseca/55a9a0e0e228ad841032df1624da5e27/raw/8b5f0a1578be701128f09f886f9636389ae60268/dbghelp-win32.7z'
$DBGHELP_64_SUM = '9bdc77e09a9ebdc8f810c46ed2b1171c048d6ebbe1b9ea1f927bfac66220dae5'
$DBGHELP_32_SUM = 'dfdf39857b76533adb0bffd9ef9d1bc7516280f810ecea6dd5c1b5ca97809706'

$NINJA_URL = 'https://github.com/ninja-build/ninja/releases/download/v1.11.1/ninja-win.zip'
$NINJA_SUM = '524b344a1a9a55005eaf868d991e090ab8ce07fa109f1820d40e74642e289abc'

0 comments on commit 64a92e1

Please sign in to comment.