From b1020bdd5b8056643acff538b44ce26b56454b35 Mon Sep 17 00:00:00 2001 From: Alexander Wilms Date: Mon, 8 Jan 2024 19:13:23 +0000 Subject: [PATCH] Enable unit tests for Linux CI builds --- .github/workflows/github.yml | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/.github/workflows/github.yml b/.github/workflows/github.yml index f3f84aec8..d25b2b35e 100644 --- a/.github/workflows/github.yml +++ b/.github/workflows/github.yml @@ -6,6 +6,7 @@ on: - features/* - beta - master + - develop pull_request: schedule: - cron: '0 2 * * *' @@ -70,11 +71,12 @@ jobs: include: - platform: linux-qt6 os: ubuntu-22.04 - test: 0 + test: 1 preset: linux-clang-test - platform: linux + os: ubuntu-22.04 - test: 0 + test: 1 preset: linux-gcc-test - platform: linux os: ubuntu-20.04 @@ -206,6 +208,20 @@ jobs: max-size: "5G" 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 if: "${{ matrix.conan_profile != '' }}" with: