2024-01-11 04:46:37 -05:00
|
|
|
name: Test
|
2023-12-23 08:05:07 -05:00
|
|
|
|
|
|
|
on: [push, pull_request]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
pytest-win:
|
2024-01-11 04:46:37 -05:00
|
|
|
name: 'Python Windows'
|
2023-12-23 08:05:07 -05:00
|
|
|
runs-on: windows-latest
|
|
|
|
|
|
|
|
steps:
|
2024-01-24 21:16:29 -05:00
|
|
|
- uses: actions/checkout@v4
|
2023-12-23 08:05:07 -05:00
|
|
|
|
2024-02-04 13:37:37 -05:00
|
|
|
- name: Restore cached original binaries
|
|
|
|
id: cache-original-binaries
|
|
|
|
uses: actions/cache/restore@v3
|
|
|
|
with:
|
|
|
|
enableCrossOsArchive: true
|
|
|
|
path: legobin
|
|
|
|
key: legobin
|
|
|
|
|
|
|
|
- name: Download original island binares
|
|
|
|
if: ${{ !steps.cache-original-binaries.outputs.cache-hit }}
|
|
|
|
run: |
|
|
|
|
C:\msys64\usr\bin\wget.exe https://legoisland.org/download/ISLE.EXE --directory-prefix=legobin
|
|
|
|
C:\msys64\usr\bin\wget.exe https://legoisland.org/download/LEGO1.DLL --directory-prefix=legobin
|
|
|
|
|
|
|
|
- name: Cache original binaries
|
|
|
|
if: ${{ !steps.cache-original-binaries.outputs.cache-hit }}
|
|
|
|
uses: actions/cache/save@v3
|
|
|
|
with:
|
|
|
|
enableCrossOsArchive: true
|
|
|
|
path: legobin
|
|
|
|
key: legobin
|
|
|
|
|
2023-12-23 08:05:07 -05:00
|
|
|
- name: Install python libraries
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
pip install pytest -r tools/requirements.txt
|
|
|
|
|
|
|
|
- name: Run python unit tests (Windows)
|
|
|
|
shell: bash
|
|
|
|
run: |
|
2024-02-04 13:37:37 -05:00
|
|
|
pytest tools/isledecomp --lego1=legobin/LEGO1.DLL
|
2023-12-23 08:05:07 -05:00
|
|
|
|
|
|
|
pytest-ubuntu:
|
2024-01-11 04:46:37 -05:00
|
|
|
name: 'Python Linux'
|
2023-12-23 08:05:07 -05:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
2024-01-24 21:16:29 -05:00
|
|
|
- uses: actions/checkout@v4
|
2023-12-23 08:05:07 -05:00
|
|
|
|
2024-02-04 13:37:37 -05:00
|
|
|
- name: Restore cached original binaries
|
|
|
|
id: cache-original-binaries
|
|
|
|
uses: actions/cache/restore@v3
|
|
|
|
with:
|
|
|
|
enableCrossOsArchive: true
|
|
|
|
path: legobin
|
|
|
|
key: legobin
|
|
|
|
|
|
|
|
- name: Download original island binares
|
|
|
|
if: ${{ !steps.cache-original-binaries.outputs.cache-hit }}
|
|
|
|
run: |
|
|
|
|
wget https://legoisland.org/download/ISLE.EXE --directory-prefix=legobin
|
|
|
|
wget https://legoisland.org/download/LEGO1.DLL --directory-prefix=legobin
|
|
|
|
|
|
|
|
- name: Cache original binaries
|
|
|
|
if: ${{ !steps.cache-original-binaries.outputs.cache-hit }}
|
|
|
|
uses: actions/cache/save@v3
|
|
|
|
with:
|
|
|
|
enableCrossOsArchive: true
|
|
|
|
path: legobin
|
|
|
|
key: legobin
|
|
|
|
|
2023-12-23 08:05:07 -05:00
|
|
|
- name: Install python libraries
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
pip install pytest -r tools/requirements.txt
|
|
|
|
|
|
|
|
- name: Run python unit tests (Ubuntu)
|
|
|
|
shell: bash
|
|
|
|
run: |
|
2024-02-04 13:37:37 -05:00
|
|
|
pytest tools/isledecomp --lego1=legobin/LEGO1.DLL
|