yet again fix nuclear bomb #108
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: Tests | |
on: [push, pull_request] | |
jobs: | |
Windows: | |
name: windows-${{ matrix.os-version }}-${{ matrix.build-config }}-${{ matrix.build-arch }} | |
runs-on: windows-${{ matrix.os-version }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os-version: [2019, 2022] | |
build-config: [debug, relwithdebinfo, release] | |
build-arch: [x64] | |
steps: | |
- name: Versions | |
shell: bash | |
run: | | |
cmake --version | |
git --version | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Configure | |
shell: bash | |
run: | | |
mkdir build | |
cd build | |
cmake -A${{ matrix.build-arch }} -DCMAKE_BUILD_TYPE=${{ matrix.build-config }} .. | |
- name: Build | |
shell: bash | |
run: | | |
cd build | |
cmake --build . --config ${{ matrix.build-config }} | |
- name: Run | |
shell: bash | |
run: | | |
cd build/result/${{ matrix.build-config }} | |
./dntgenerator.exe -s 20 -e 22 -m 30 | |
Ubuntu: | |
name: ubuntu-${{ matrix.os-version }}-${{ matrix.build-config }}-${{ matrix.compiler.cc }} | |
runs-on: ubuntu-${{ matrix.os-version }}.04 | |
env: | |
CC: ${{ matrix.compiler.cc }} | |
CXX: ${{ matrix.compiler.cxx }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os-version: [22] | |
build-config: [debug, relwithdebinfo, release] | |
compiler: | |
- { | |
cc: gcc-13, | |
cxx: g++-13, | |
install: gcc-13 g++-13 jq | |
} | |
- { | |
cc: clang-14, | |
cxx: clang++-14, | |
install: clang-14 | |
} | |
steps: | |
- name: Install packages | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y xorg-dev nasm ${{ matrix.compiler.install }} | |
- name: Versions | |
run: | | |
cmake --version | |
${{ matrix.compiler.cc }} --version | |
${{ matrix.compiler.cxx }} --version | |
git --version | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Configure | |
run: | | |
mkdir build | |
cd build | |
cmake -DCMAKE_BUILD_TYPE=${{ matrix.build-config }} .. | |
- name: Build | |
run: | | |
cd build | |
cmake --build . --config ${{ matrix.build-config }} -- -j3 | |
- name: Run | |
shell: bash | |
run: | | |
cd build/result/${{ matrix.build-config }} | |
./dntgenerator -s 20 -e 22 -m 30 | |
- name: List Icons | |
if: matrix.build-config == 'release' && matrix.compiler.cc == 'gcc-13' | |
shell: bash | |
run: | | |
cd build/result/${{ matrix.build-config }} | |
./dntgenerator -s 0 -e 500 | |
cat dungeon.json | jq ".. | .icon?" | sort -u > icons.txt | |
cat dungeon.json | jq ".. | .decoration? | .icon?" | sort -u > icons_decoration.txt | |
cat dungeon.json | jq ".. | .item? | .icon?" | sort -u > icons_items.txt | |
cat dungeon.json | jq ".. | .monster? | .icon?" | sort -u > icons_monsters.txt | |
cat dungeon.json | jq ".. | .algorithm?" | sort -u > algorithms.txt | |
cat dungeon.json | jq ".. | .faction?" | sort -u > factions.txt | |
cat dungeon.json | jq ".. | .name?" | sort -u > names.txt | |
- name: Upload Icons List | |
if: matrix.build-config == 'release' && matrix.compiler.cc == 'gcc-13' | |
uses: actions/upload-artifact@v3 | |
with: | |
name: dnticons | |
path: | | |
build/result/${{ matrix.build-config }}/icons.txt | |
build/result/${{ matrix.build-config }}/icons_decoration.txt | |
build/result/${{ matrix.build-config }}/icons_items.txt | |
build/result/${{ matrix.build-config }}/icons_monsters.txt | |
build/result/${{ matrix.build-config }}/algorithms.txt | |
build/result/${{ matrix.build-config }}/factions.txt | |
build/result/${{ matrix.build-config }}/names.txt | |