mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
Co-authored-by: Rangi <35663410+Rangi42@users.noreply.github.com> Co-authored-by: Eldred Habert <eldredhabert0@gmail.com>
This commit is contained in:
35
.github/workflows/testing.yml
vendored
35
.github/workflows/testing.yml
vendored
@@ -55,6 +55,17 @@ jobs:
|
||||
with:
|
||||
name: rgbds-canary-${{ matrix.os }}-${{ matrix.cc }}-${{ matrix.buildsys }}
|
||||
path: bins
|
||||
- name: Check test dependency repositories cache
|
||||
id: test-deps-cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: test
|
||||
key: ${{ hashFiles('test/fetch-test-deps.sh') }}
|
||||
- if: ${{ steps.test-deps-cache.outputs.cache-hit != 'true' }}
|
||||
name: Fetch test dependency repositories
|
||||
continue-on-error: true
|
||||
run: |
|
||||
test/fetch-test-deps.sh
|
||||
- name: Test
|
||||
shell: bash
|
||||
run: |
|
||||
@@ -116,6 +127,18 @@ jobs:
|
||||
with:
|
||||
name: rgbds-canary-win${{ matrix.bits }}
|
||||
path: bins
|
||||
- name: Check test dependency repositories cache
|
||||
id: test-deps-cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: test
|
||||
key: ${{ hashFiles('test/fetch-test-deps.sh') }}
|
||||
- if: ${{ steps.test-deps-cache.outputs.cache-hit != 'true' }}
|
||||
name: Fetch test dependency repositories
|
||||
shell: bash
|
||||
continue-on-error: true
|
||||
run: |
|
||||
test/fetch-test-deps.sh
|
||||
- name: Test
|
||||
shell: bash
|
||||
run: |
|
||||
@@ -198,6 +221,18 @@ jobs:
|
||||
run: |
|
||||
cp bins/* .
|
||||
cp bins/*.dll test/gfx
|
||||
- name: Check test dependency repositories cache
|
||||
id: test-deps-cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: test
|
||||
key: ${{ hashFiles('test/fetch-test-deps.sh') }}
|
||||
- if: ${{ steps.test-deps-cache.outputs.cache-hit != 'true' }}
|
||||
name: Fetch test dependency repositories
|
||||
shell: bash
|
||||
continue-on-error: true
|
||||
run: |
|
||||
test/fetch-test-deps.sh
|
||||
- name: Run tests
|
||||
shell: bash
|
||||
run: |
|
||||
|
||||
23
test/fetch-test-deps.sh
Executable file
23
test/fetch-test-deps.sh
Executable file
@@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
echo "Fetching test dependency repositories"
|
||||
|
||||
fetch_downstream() { # owner/repo shallow-since commit
|
||||
if [ ! -d ${1##*/} ]; then
|
||||
git clone https://github.com/$1.git --shallow-since=$2 --single-branch
|
||||
fi
|
||||
pushd ${1##*/}
|
||||
git checkout -f $3
|
||||
if [ -f ../patches/${1##*/}.patch ]; then
|
||||
git apply --ignore-whitespace ../patches/${1##*/}.patch
|
||||
fi
|
||||
popd
|
||||
}
|
||||
|
||||
fetch_downstream pret/pokecrystal 2022-09-29 70a3ec1accb6de1c1c273470af0ddfa2edc1b0a9
|
||||
fetch_downstream pret/pokered 2022-09-29 2b52ceb718b55dce038db24d177715ae4281d065
|
||||
fetch_downstream AntonioND/ucity 2022-04-20 d8878233da7a6569f09f87b144cb5bf140146a0f
|
||||
@@ -25,20 +25,16 @@ done
|
||||
# When updating subprojects, change the commit being checked out, and set the `shallow-since`
|
||||
# to the day before, to reduce the amount of refs being transferred and thus speed up CI.
|
||||
|
||||
test_downstream() { # owner/repo shallow-since commit make-target
|
||||
if [ ! -d ${1##*/} ]; then
|
||||
git clone https://github.com/$1.git --shallow-since=$2 --single-branch
|
||||
fi
|
||||
pushd ${1##*/}
|
||||
git checkout -f $3
|
||||
if [ -f ../patches/${1##*/}.patch ]; then
|
||||
git apply --ignore-whitespace ../patches/${1##*/}.patch
|
||||
test_downstream() { # owner/repo make-target
|
||||
if ! pushd ${1##*/}; then
|
||||
echo >&2 'Please run `fetch-test-deps.sh` before running the test suite'
|
||||
return 1
|
||||
fi
|
||||
make clean
|
||||
make -j4 $4 RGBDS=../../
|
||||
make -j4 $2 RGBDS=../../
|
||||
popd
|
||||
}
|
||||
|
||||
test_downstream pret/pokecrystal 2022-09-29 70a3ec1accb6de1c1c273470af0ddfa2edc1b0a9 compare
|
||||
test_downstream pret/pokered 2022-09-29 2b52ceb718b55dce038db24d177715ae4281d065 compare
|
||||
test_downstream AntonioND/ucity 2022-04-20 d8878233da7a6569f09f87b144cb5bf140146a0f ''
|
||||
test_downstream pret/pokecrystal compare
|
||||
test_downstream pret/pokered compare
|
||||
test_downstream AntonioND/ucity ''
|
||||
|
||||
Reference in New Issue
Block a user