1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-26 22:57:00 +02:00

Enable unit tests for Linux CI builds

This commit is contained in:
Alexander Wilms 2024-01-08 19:13:23 +00:00
parent ae79c5e953
commit b1020bdd5b

View File

@ -6,6 +6,7 @@ on:
- features/* - features/*
- beta - beta
- master - master
- develop
pull_request: pull_request:
schedule: schedule:
- cron: '0 2 * * *' - cron: '0 2 * * *'
@ -70,11 +71,12 @@ jobs:
include: include:
- platform: linux-qt6 - platform: linux-qt6
os: ubuntu-22.04 os: ubuntu-22.04
test: 0 test: 1
preset: linux-clang-test preset: linux-clang-test
- platform: linux - platform: linux
os: ubuntu-22.04 os: ubuntu-22.04
test: 0 test: 1
preset: linux-gcc-test preset: linux-gcc-test
- platform: linux - platform: linux
os: ubuntu-20.04 os: ubuntu-20.04
@ -206,6 +208,20 @@ jobs:
max-size: "5G" max-size: "5G"
verbose: 2 verbose: 2
- name: Clone Heroes 3 data
if: ${{ startsWith(matrix.preset, 'linux') && endsWith(matrix.preset, 'test') }}
env:
HEROES_3_DATA_PASSWORD: ${{ secrets.HEROES_3_DATA_PASSWORD }}
run: |
git clone https://github.com/Alexander-Wilms/encrypted_heroes_3_data
if [ ! -f encrypted_heroes_3_data/HoMM3_data_encrypted/Data/H3sprite.lod.enc ]; then echo "Failed to clone Heroes 3 data" && exit 1; fi
cd encrypted_heroes_3_data && ./crypt.py -p $HEROES_3_DATA_PASSWORD -d
tree
# fail CI stage if something went wrong
if [ ! -f HoMM3_data_decrypted/Data/H3bitmap.lod ]; then echo "Failed to decrypt Heroes 3 data" && exit 1; fi
mkdir -p ~/.local/share/vcmi/
mv HoMM3_data_decrypted/* ~/.local/share/vcmi/
- uses: actions/setup-python@v4 - uses: actions/setup-python@v4
if: "${{ matrix.conan_profile != '' }}" if: "${{ matrix.conan_profile != '' }}"
with: with: