Skip to content

tests: simplify detection of Catch v3 for tests #562

tests: simplify detection of Catch v3 for tests

tests: simplify detection of Catch v3 for tests #562

Workflow file for this run

name: Cross-compile for Win32
on: push
jobs:
build_cross-win32_dynamic:
runs-on: ubuntu-22.04
steps:
# Checks-out the repository under $GITHUB_WORKSPACE.
- uses: actions/checkout@v4
- name: Install Debian packages
run: |
sudo apt-get update
sudo apt-get install -y catch cmake libz-mingw-w64-dev pkg-config
sudo apt-get install -y binutils-mingw-w64-i686 g++-mingw-w64-i686 gcc-mingw-w64-i686 mingw-w64-i686-dev
- name: Build with MinGW for Win32
run: |
export CXX=i686-w64-mingw32-c++-win32
export CC=i686-w64-mingw32-gcc-win32
cd $GITHUB_WORKSPACE
mkdir build
cd build
cmake ../
make -j2
- name: Tests
run: |
cd "$GITHUB_WORKSPACE"/build
ctest -V
- name: Collect zlib1.dll and other DLLs for artifact upload
run: |
mkdir -p "$GITHUB_WORKSPACE"/build/artifacts
cp /usr/i686-w64-mingw32/lib/zlib1.dll "$GITHUB_WORKSPACE"/build/artifacts/zlib1.dll
cp /usr/lib/gcc/i686-w64-mingw32/10-win32/libstdc++-6.dll "$GITHUB_WORKSPACE"/build/artifacts/libstdc++-6.dll
cp /usr/lib/gcc/i686-w64-mingw32/10-win32/libgcc_s_dw2-1.dll "$GITHUB_WORKSPACE"/build/artifacts/libgcc_s_dw2-1.dll
- name: Collect build artifacts in one place
run: |
cd "$GITHUB_WORKSPACE"/build
cp apps/mw/cell_translator/cell_translator.exe artifacts/
cp apps/mw/data_cleaner/data_cleaner.exe artifacts/
cp apps/mw/name_generator/name_generator_mw.exe artifacts/
cp apps/mw/skill_rebalance/skill_rebalance.exe artifacts/
cp apps/mw/spell_rename/spell_rename.exe artifacts/
cp apps/sr/bsa_cli/bsa-cli.exe artifacts/
cp apps/sr/conv_cams/conv_cams.exe artifacts/
cp apps/sr/formID_finder/formID_finder.exe artifacts/
cp apps/sr/small_high_elves/small_high_elves.exe artifacts/
- name: Archive build artifacts
uses: actions/upload-artifact@v4
with:
name: build-artifacts-dynamic-linking
path: |
build/artifacts/*.exe
build/artifacts/*.dll
build_cross-win32_static:
runs-on: ubuntu-22.04
steps:
# Checks-out the repository under $GITHUB_WORKSPACE.
- uses: actions/checkout@v4
- name: Install Debian packages
run: |
sudo apt-get update
sudo apt-get install -y catch cmake libz-mingw-w64-dev pkg-config
sudo apt-get install -y binutils-mingw-w64-i686 g++-mingw-w64-i686 gcc-mingw-w64-i686 mingw-w64-i686-dev
- name: Build with MinGW for Win32
run: |
export CXX=i686-w64-mingw32-c++-win32
export CC=i686-w64-mingw32-gcc-win32
cd $GITHUB_WORKSPACE
mkdir build
cd build
cmake -DENABLE_LTO=ON -DENABLE_STATIC_LINKING=ON ../
make -j2
- name: Tests
run: |
cd "$GITHUB_WORKSPACE"/build
ctest -V
- name: Collect build artifacts in one place
run: |
cd "$GITHUB_WORKSPACE"/build
mkdir -p "$GITHUB_WORKSPACE"/build/artifacts
cp apps/mw/cell_translator/cell_translator.exe artifacts/
cp apps/mw/data_cleaner/data_cleaner.exe artifacts/
cp apps/mw/name_generator/name_generator_mw.exe artifacts/
cp apps/mw/skill_rebalance/skill_rebalance.exe artifacts/
cp apps/mw/spell_rename/spell_rename.exe artifacts/
cp apps/sr/bsa_cli/bsa-cli.exe artifacts/
cp apps/sr/conv_cams/conv_cams.exe artifacts/
cp apps/sr/formID_finder/formID_finder.exe artifacts/
cp apps/sr/small_high_elves/small_high_elves.exe artifacts/
- name: Archive build artifacts
uses: actions/upload-artifact@v4
with:
name: build-artifacts-static-linking
path: |
build/artifacts/*.exe