ci: update actions/upload-artifact to v4 in debian.yml #165
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: MSYS2 | |
on: push | |
jobs: | |
msys2_mingw64: | |
runs-on: windows-2022 | |
defaults: | |
run: | |
shell: msys2 {0} | |
steps: | |
# Checks-out the repository under $GITHUB_WORKSPACE. | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: msys2/setup-msys2@v2 | |
with: | |
msystem: mingw64 | |
update: true | |
install: >- | |
git | |
mingw-w64-x86_64-catch | |
mingw-w64-x86_64-curl-winssl | |
mingw-w64-x86_64-cmake | |
mingw-w64-x86_64-gcc | |
mingw-w64-x86_64-libmariadbclient | |
mingw-w64-x86_64-make | |
mingw-w64-x86_64-ninja | |
mingw-w64-x86_64-pkg-config | |
- name: Build | |
run: | | |
export MSYSTEM=MINGW64 | |
export CXX=g++ | |
export CC=gcc | |
cd "$GITHUB_WORKSPACE" | |
mkdir build | |
cd build | |
cmake ../ -DJSON_BENCHMARK=ON | |
cmake --build . -j2 | |
- name: Tests | |
run: | | |
export MSYSTEM=MINGW64 | |
cd "$GITHUB_WORKSPACE"/build | |
ctest -V | |
- name: Gather build artifacts | |
run: | | |
export MSYSTEM=MINGW64 | |
cd "$GITHUB_WORKSPACE" | |
mkdir artifacts | |
# binary files and DLL dependencies | |
./ci/copy-dll-dependencies.sh build/src/collector/weather-information-collector.exe artifacts/ | |
./ci/copy-dll-dependencies.sh build/src/configtest/weather-information-collector-configtest.exe artifacts/ | |
./ci/copy-dll-dependencies.sh build/src/creator/weather-information-collector-task-creator.exe artifacts/ | |
./ci/copy-dll-dependencies.sh build/src/synchronizer/weather-information-collector-synchronizer.exe artifacts/ | |
./ci/copy-dll-dependencies.sh build/src/update/weather-information-collector-update.exe artifacts/ | |
# license and third party notices | |
cp LICENSE artifacts/ | |
cp doc/third-party.md artifacts/ | |
# individual readme files for each binary | |
cp src/collector/readme.md artifacts/readme-weather-information-collector.md | |
cp src/configtest/readme.md artifacts/readme-weather-information-collector-configtest.md | |
cp src/creator/readme.md artifacts/readme-weather-information-collector-task-creator.md | |
cp src/synchronizer/readme.md artifacts/readme-weather-information-collector-synchronizer.md | |
cp src/update/readme.md artifacts/readme-weather-information-collector-update.md | |
# documentation folder | |
cp -R doc artifacts/documentation | |
# ... but remove MSYS2 build instructions | |
unlink artifacts/documentation/msys2-build.md | |
# determine version | |
VERSION=$(git describe --always) | |
echo Version is $VERSION. | |
mv artifacts weather-information-collector-$VERSION | |
'/c/Program Files/7-Zip/7z.exe' a -r weather-information-collector_${VERSION}_win64.zip weather-information-collector-${VERSION} | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: weather-information-collector-windows-msys2 | |
path: | | |
weather-information-collector_*.zip | |
if-no-files-found: error |