ci: upgrade Fedora 39 to Fedora 40 in GitLab CI job for Fedora #71
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-cmake | |
mingw-w64-x86_64-gcc | |
mingw-w64-x86_64-sqlite3 | |
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 ../ | |
cmake --build . -j2 | |
- name: Tests | |
run: | | |
export MSYSTEM=MINGW64 | |
cd "$GITHUB_WORKSPACE"/build | |
ctest -V | |
- name: Build statically linked binaries | |
run: | | |
export MSYSTEM=MINGW64 | |
export CXX=g++ | |
export CC=gcc | |
cd "$GITHUB_WORKSPACE" | |
mkdir build-static | |
cd build-static | |
cmake ../ -DENABLE_LTO=ON -DENABLE_STATIC_LINKING=ON | |
cmake --build . -j2 | |
- name: Collect statically linked artifacts | |
run: | | |
export MSYSTEM=MINGW64 | |
cd "$GITHUB_WORKSPACE" | |
# db2csv | |
mkdir -p "$GITHUB_WORKSPACE"/artifacts/db2csv | |
cp build-static/src/db2csv/thermos-db2csv.exe artifacts/db2csv/ | |
cp src/db2csv/readme.md artifacts/db2csv/ | |
# graph-generator | |
mkdir -p "$GITHUB_WORKSPACE"/artifacts/graph-generator | |
cp build-static/src/graph-generator/thermos-graph-generator.exe artifacts/graph-generator/ | |
cp src/graph-generator/readme.md artifacts/graph-generator/ | |
cp src/graph-generator/graph.tpl artifacts/graph-generator/ | |
# info | |
mkdir -p "$GITHUB_WORKSPACE"/artifacts/info | |
cp build-static/src/info/thermos-info.exe artifacts/info/ | |
cp src/info/readme.md artifacts/info/ | |
# logger | |
mkdir -p "$GITHUB_WORKSPACE"/artifacts/logger | |
cp build-static/src/logger/thermos-logger.exe artifacts/logger/ | |
cp src/logger/readme.md artifacts/logger/ | |
# license + changelog + third-party notices | |
cp LICENSE artifacts/ | |
cp changelog.md artifacts/ | |
cp documentation/third-party.md artifacts/ | |
# determine version | |
VERSION=$(git describe --always) | |
echo Version is $VERSION. | |
mv artifacts thermos-$VERSION | |
"C:\Program Files\7-Zip\7z.exe" a -r thermos_${VERSION}_win64.zip thermos-$VERSION | |
- name: Archive build artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: thermos-msys2-win64 | |
path: thermos_*_win64.zip | |
if-no-files-found: error |