Skip to content

ci: use new Alpine 3.21 for Alpine-based build #194

ci: use new Alpine 3.21 for Alpine-based build

ci: use new Alpine 3.21 for Alpine-based build #194

Workflow file for this run

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-boost
mingw-w64-x86_64-catch
mingw-w64-x86_64-cmake
mingw-w64-x86_64-gcc
mingw-w64-x86_64-lz4
mingw-w64-x86_64-make
mingw-w64-x86_64-ninja
mingw-w64-x86_64-pkg-config
mingw-w64-x86_64-zlib
- 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
# Skyrim tools
cmake --build . -j2 --target bsa-cli
cmake --build . -j2 --target conv_cams
cmake --build . -j2 --target formID_finder
cmake --build . -j2 --target small_high_elves
# Morrowind tools
cmake --build . -j2 --target cell_translator
cmake --build . -j2 --target data_cleaner
cmake --build . -j2 --target name_generator_mw
cmake --build . -j2 --target skill_rebalance
cmake --build . -j2 --target spell_rename
- name: Collect statically linked artifacts
run: |
export MSYSTEM=MINGW64
mkdir -p "$GITHUB_WORKSPACE"/artifacts
cd "$GITHUB_WORKSPACE"
cp build-static/apps/mw/cell_translator/cell_translator.exe artifacts/
cp build-static/apps/mw/data_cleaner/data_cleaner.exe artifacts/
cp build-static/apps/mw/name_generator/name_generator_mw.exe artifacts/
cp build-static/apps/mw/skill_rebalance/skill_rebalance.exe artifacts/
cp build-static/apps/mw/spell_rename/spell_rename.exe artifacts/
cp build-static/apps/sr/bsa_cli/bsa-cli.exe artifacts/
cp build-static/apps/sr/conv_cams/conv_cams.exe artifacts/
cp build-static/apps/sr/formID_finder/formID_finder.exe artifacts/
cp build-static/apps/sr/small_high_elves/small_high_elves.exe artifacts/
- name: Archive build artifacts
uses: actions/upload-artifact@v4
with:
name: msys2-artifacts-static-linking
path: |
artifacts/*.exe
- name: Collect files for bsa-cli
run: |
export MSYSTEM=MINGW64
mkdir -p "$GITHUB_WORKSPACE"/bsa-cli
cd "$GITHUB_WORKSPACE"
cp build-static/apps/sr/bsa_cli/bsa-cli.exe bsa-cli/
cp apps/sr/bsa_cli/readme.md bsa-cli/
cp apps/sr/bsa_cli/changelog.md bsa-cli/
cp apps/sr/bsa_cli/third-party.md bsa-cli/
cp LICENSE bsa-cli/
VERSION=$(git describe --always --match=bsa_cli_* | cut -d'_' -f3-)
mv bsa-cli bsa-cli_$VERSION
'/c/Program Files/7-Zip/7z.exe' a -r bsa-cli_${VERSION}_win64.zip bsa-cli_${VERSION}
- name: Create bsa-cli artifact
uses: actions/upload-artifact@v4
with:
name: bsa-cli-win64
if-no-files-found: error
path: |
bsa-cli_*_win64.zip
- name: Collect files for Form ID finder
run: |
export MSYSTEM=MINGW64
mkdir -p "$GITHUB_WORKSPACE"/formID_finder
cd "$GITHUB_WORKSPACE"
cp build-static/apps/sr/formID_finder/formID_finder.exe formID_finder/
cp apps/sr/formID_finder/readme.md formID_finder/
cp apps/sr/formID_finder/ChangeLog.de.md formID_finder/
cp apps/sr/formID_finder/ChangeLog.en.md formID_finder/
cp apps/sr/formID_finder/third-party.md formID_finder/
cp LICENSE formID_finder/
VERSION=$(git describe --always --match=formID_finder_* | cut -d'_' -f3-)
mv formID_finder formID_finder_$VERSION
'/c/Program Files/7-Zip/7z.exe' a -r formID_finder_${VERSION}_win64.zip formID_finder_$VERSION
- name: Create Form ID finder artifact
uses: actions/upload-artifact@v4
with:
name: formID-finder-win64
if-no-files-found: error
path: |
formID_finder_*_win64.zip