mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-28 13:57:48 +00:00
109 lines
3.0 KiB
YAML
109 lines
3.0 KiB
YAML
name: "Regression testing"
|
|
on: push
|
|
|
|
jobs:
|
|
unix-testing:
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-20.04, ubuntu-18.04, ubuntu-16.04, macos-10.15]
|
|
cc: [gcc, clang]
|
|
include:
|
|
- os: ubuntu-18.04
|
|
cc: gcc
|
|
target: develop
|
|
fail-fast: false
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Install deps
|
|
shell: bash
|
|
run: |
|
|
./.github/actions/install_deps.sh ${{ matrix.os }}
|
|
- name: Build
|
|
run: |
|
|
make ${{ matrix.target }} -j Q= CC=${{ matrix.cc }}
|
|
- name: Install
|
|
run: |
|
|
sudo make install -j Q=
|
|
- name: Package binaries
|
|
run: |
|
|
mkdir bins
|
|
cp rgb{asm,link,fix,gfx} bins
|
|
- name: Upload binaries
|
|
uses: actions/upload-artifact@v1
|
|
with:
|
|
name: rgbds-canary-${{ matrix.os }}-${{ matrix.cc }}
|
|
path: bins
|
|
- name: Test
|
|
shell: bash
|
|
run: |
|
|
test/run-tests.sh
|
|
|
|
windows-build:
|
|
strategy:
|
|
matrix:
|
|
bits: [32, 64]
|
|
os: [ubuntu-latest]
|
|
include:
|
|
- bits: 32
|
|
arch: i686
|
|
triplet: i686-w64-mingw32
|
|
- bits: 64
|
|
arch: x86-64
|
|
triplet: x86_64-w64-mingw32
|
|
runs-on: ${{ matrix.os }}
|
|
env:
|
|
DIST_DIR: win${{ matrix.bits }}
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Install deps
|
|
shell: bash
|
|
run: |
|
|
./.github/actions/install_deps.sh ${{ matrix.os }}
|
|
- name: Install MinGW
|
|
run: |
|
|
sudo apt-get install gcc-mingw-w64-${{ matrix.arch }} mingw-w64-tools libz-mingw-w64-dev
|
|
- name: Install libpng dev headers for MinGW
|
|
run: |
|
|
sudo ./.github/actions/mingw-w64-libpng-dev.sh ${{ matrix.triplet }}
|
|
- name: Build Windows binaries
|
|
run: |
|
|
make mingw${{ matrix.bits }} -j Q=
|
|
- name: Package binaries
|
|
run: |
|
|
mkdir bins
|
|
mv rgbasm bins/rgbasm.exe
|
|
mv rgblink bins/rgblink.exe
|
|
mv rgbfix bins/rgbfix.exe
|
|
mv rgbgfx bins/rgbgfx.exe
|
|
cp /usr/${{ matrix.triplet }}/lib/zlib1.dll bins
|
|
cp /usr/${{ matrix.triplet }}/bin/libpng16-16.dll bins
|
|
if [ ${{ matrix.bits }} -eq 32 ]; then cp /usr/lib/gcc/${{ matrix.triplet }}/7.3-win32/libgcc_s_sjlj-1.dll bins; fi
|
|
- name: Upload Windows binaries
|
|
uses: actions/upload-artifact@v1
|
|
with:
|
|
name: rgbds-canary-win${{ matrix.bits }}
|
|
path: bins
|
|
|
|
windows-testing:
|
|
needs: windows-build
|
|
strategy:
|
|
matrix:
|
|
bits: [32, 64]
|
|
runs-on: windows-2019
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Retrieve binaries
|
|
uses: actions/download-artifact@v1
|
|
with:
|
|
name: rgbds-canary-win${{ matrix.bits }}
|
|
path: bins
|
|
- name: Extract binaries
|
|
shell: bash
|
|
run: |
|
|
cp bins/* .
|
|
- name: Run tests
|
|
shell: bash
|
|
run: |
|
|
test/run-tests.sh
|