|
|
|
@ -46,45 +46,66 @@ jobs:
|
|
|
|
|
plugins: "all"
|
|
|
|
|
|
|
|
|
|
test-windows:
|
|
|
|
|
name: Test (Windows, MSVC, default plugins)
|
|
|
|
|
needs: build-windows
|
|
|
|
|
runs-on: windows-latest
|
|
|
|
|
name: Test (${{ matrix.os }}, ${{ matrix.compiler }}, ${{ matrix.plugins }} plugins)
|
|
|
|
|
needs:
|
|
|
|
|
- build-windows
|
|
|
|
|
- build-linux
|
|
|
|
|
runs-on: ${{ matrix.os }}-latest
|
|
|
|
|
strategy:
|
|
|
|
|
fail-fast: false
|
|
|
|
|
matrix:
|
|
|
|
|
include:
|
|
|
|
|
- os: windows
|
|
|
|
|
compiler: msvc
|
|
|
|
|
plugins: "default"
|
|
|
|
|
# TODO: uncomment once we have a linux build we can download from bay12
|
|
|
|
|
# - os: ubuntu
|
|
|
|
|
# compiler: gcc-10
|
|
|
|
|
# gcc: 10
|
|
|
|
|
# plugins: "default"
|
|
|
|
|
# - os: ubuntu
|
|
|
|
|
# compiler: gcc-10
|
|
|
|
|
# gcc: 12
|
|
|
|
|
# plugins: "all"
|
|
|
|
|
steps:
|
|
|
|
|
- name: Set env
|
|
|
|
|
- name: Set env (windows)
|
|
|
|
|
if: matrix.os == 'windows'
|
|
|
|
|
run: echo "DF_FOLDER=DF" >> $env:GITHUB_ENV
|
|
|
|
|
- name: Set env (posix)
|
|
|
|
|
if: matrix.os != 'windows'
|
|
|
|
|
run: echo "DF_FOLDER=DF" >> $GITHUB_ENV
|
|
|
|
|
- name: Clone DFHack
|
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
|
with:
|
|
|
|
|
repository: 'DFHack/dfhack'
|
|
|
|
|
ref: ${{ inputs.dfhack_ref }}
|
|
|
|
|
sparse-checkout: |
|
|
|
|
|
CMakeLists.txt
|
|
|
|
|
ci/
|
|
|
|
|
- name: Detect DF version
|
|
|
|
|
id: get-df-version
|
|
|
|
|
run: echo ver="$(sh ci/get-df-version.sh)" >> $env:GITHUB_OUTPUT
|
|
|
|
|
- name: Detect DF version (windows)
|
|
|
|
|
if: matrix.os == 'windows'
|
|
|
|
|
run: echo DF_VERSION="$(sh ci/get-df-version.sh)" >> $env:GITHUB_ENV
|
|
|
|
|
- name: Detect DF version (posix)
|
|
|
|
|
if: matrix.os != 'windows'
|
|
|
|
|
run: echo DF_VERSION="$(sh ci/get-df-version.sh)" >> $GITHUB_ENV
|
|
|
|
|
- name: Fetch DF cache
|
|
|
|
|
id: restore-df
|
|
|
|
|
uses: actions/cache/restore@v3
|
|
|
|
|
with:
|
|
|
|
|
path: ${{ env.DF_FOLDER }}
|
|
|
|
|
key: df-windows-${{ steps.get-df-version.outputs.ver }}-${{ hashFiles('ci/download-df.sh') }}
|
|
|
|
|
key: df-${{ matrix.os }}-${{ env.DF_VERSION }}-${{ hashFiles('ci/download-df.sh') }}
|
|
|
|
|
- name: Download DF
|
|
|
|
|
if: steps.restore-df.outputs.cache-hit != 'true'
|
|
|
|
|
run: sh ci/download-df.sh ${{ env.DF_FOLDER }} windows ${{ steps.get-df-version.outputs.ver }}
|
|
|
|
|
run: sh ci/download-df.sh ${{ env.DF_FOLDER }} ${{ matrix.os }} ${{ env.DF_VERSION }}
|
|
|
|
|
- name: Save DF cache
|
|
|
|
|
if: steps.restore-df.outputs.cache-hit != 'true'
|
|
|
|
|
uses: actions/cache/save@v3
|
|
|
|
|
with:
|
|
|
|
|
path: ${{ env.DF_FOLDER }}
|
|
|
|
|
key: df-windows-${{ steps.get-df-version.outputs.ver }}-${{ hashFiles('ci/download-df.sh') }}
|
|
|
|
|
key: df-${{ matrix.os }}-${{ env.DF_VERSION }}-${{ hashFiles('ci/download-df.sh') }}
|
|
|
|
|
- name: Download DFHack
|
|
|
|
|
uses: actions/download-artifact@v3
|
|
|
|
|
with:
|
|
|
|
|
name: test-msvc
|
|
|
|
|
name: test-${{ matrix.compiler }}
|
|
|
|
|
path: ${{ env.DF_FOLDER }}
|
|
|
|
|
- name: Run lua tests
|
|
|
|
|
id: run-tests
|
|
|
|
|
timeout-minutes: 10
|
|
|
|
|
run: python ci/run-tests.py --keep-status "${{ env.DF_FOLDER }}"
|
|
|
|
|
- name: Check RPC interface
|
|
|
|
@ -99,22 +120,3 @@ jobs:
|
|
|
|
|
${{ env.DF_FOLDER }}/dfhack-rpc.txt
|
|
|
|
|
${{ env.DF_FOLDER }}/test*.json
|
|
|
|
|
${{ env.DF_FOLDER }}/*.log
|
|
|
|
|
|
|
|
|
|
test-linux:
|
|
|
|
|
name: Test (Linux, GCC ${{ matrix.gcc }}, ${{ matrix.plugins }} plugins)
|
|
|
|
|
needs: build-linux
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
strategy:
|
|
|
|
|
fail-fast: false
|
|
|
|
|
matrix:
|
|
|
|
|
include:
|
|
|
|
|
- gcc: 10
|
|
|
|
|
plugins: "default"
|
|
|
|
|
- gcc: 12
|
|
|
|
|
plugins: "all"
|
|
|
|
|
steps:
|
|
|
|
|
- name: Download artifact
|
|
|
|
|
uses: actions/download-artifact@v3
|
|
|
|
|
with:
|
|
|
|
|
name: test-gcc-${{ matrix.gcc }}
|
|
|
|
|
# TODO: share windows test logic once there is a Linux DF build to test
|
|
|
|
|