mirror of
https://github.com/isledecomp/isle.git
synced 2024-11-30 11:27:40 -05:00
Reusable workflow for legobin (#555)
This commit is contained in:
parent
8786a5b44a
commit
c69cd4d818
3 changed files with 43 additions and 44 deletions
21
.github/workflows/build.yml
vendored
21
.github/workflows/build.yml
vendored
|
@ -3,6 +3,10 @@ name: Build
|
||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
fetch-deps:
|
||||||
|
name: Download original binaries
|
||||||
|
uses: ./.github/workflows/legobin.yml
|
||||||
|
|
||||||
build-current-toolchain:
|
build-current-toolchain:
|
||||||
name: 'Current ${{ matrix.toolchain.name }}'
|
name: 'Current ${{ matrix.toolchain.name }}'
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
|
@ -98,7 +102,7 @@ jobs:
|
||||||
|
|
||||||
compare:
|
compare:
|
||||||
name: 'Compare with master'
|
name: 'Compare with master'
|
||||||
needs: build
|
needs: [build, fetch-deps]
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@master
|
- uses: actions/checkout@master
|
||||||
|
@ -116,21 +120,6 @@ jobs:
|
||||||
path: legobin
|
path: legobin
|
||||||
key: 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/CONFIG.EXE --directory-prefix=legobin
|
|
||||||
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
|
|
||||||
|
|
||||||
- name: Install python packages
|
- name: Install python packages
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
|
32
.github/workflows/legobin.yml
vendored
Normal file
32
.github/workflows/legobin.yml
vendored
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
name: Download legobin
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
fetch:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
|
||||||
|
- 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 binaries
|
||||||
|
if: ${{ !steps.cache-original-binaries.outputs.cache-hit }}
|
||||||
|
run: |
|
||||||
|
wget https://legoisland.org/download/CONFIG.EXE --directory-prefix=legobin
|
||||||
|
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
|
34
.github/workflows/unittest.yml
vendored
34
.github/workflows/unittest.yml
vendored
|
@ -3,9 +3,14 @@ name: Test
|
||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
fetch-deps:
|
||||||
|
name: Download original binaries
|
||||||
|
uses: ./.github/workflows/legobin.yml
|
||||||
|
|
||||||
pytest-win:
|
pytest-win:
|
||||||
name: 'Python Windows'
|
name: 'Python Windows'
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
|
needs: fetch-deps
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
@ -18,20 +23,6 @@ jobs:
|
||||||
path: legobin
|
path: legobin
|
||||||
key: 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
|
|
||||||
|
|
||||||
- name: Install python libraries
|
- name: Install python libraries
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
@ -45,6 +36,7 @@ jobs:
|
||||||
pytest-ubuntu:
|
pytest-ubuntu:
|
||||||
name: 'Python Linux'
|
name: 'Python Linux'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
needs: fetch-deps
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
@ -57,20 +49,6 @@ jobs:
|
||||||
path: legobin
|
path: legobin
|
||||||
key: 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
|
|
||||||
|
|
||||||
- name: Install python libraries
|
- name: Install python libraries
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
|
Loading…
Reference in a new issue