Bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows #71
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: [master, ci/**] | |
pull_request: | |
branches: [master] | |
jobs: | |
# Build and run unit tests | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Cache | |
uses: actions/[email protected] | |
env: | |
cache-name: stack-dependencies | |
with: | |
path: ~/.stack | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/stack.yaml.lock', '**/stack.yaml', '**/package.yaml') }} | |
restore-keys: ${{ runner.os }}-build-${{ env.cache-name }}- | |
- name: Install packages | |
run: sudo apt-get update && sudo apt-get install libsdl2-dev | |
- name: Build and test | |
env: | |
HSPEC_OPTIONS: --format=failed-examples | |
run: | | |
stack test --copy-bins --local-bin-path bin | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: binaries-linux | |
path: bin/ | |
# Run test ROMS | |
rom_tests: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
with: | |
name: binaries-linux | |
path: bin | |
- uses: actions/checkout@v2 | |
with: | |
repository: vhelin/wla-dx | |
path: wla-dx | |
- uses: actions/checkout@v2 | |
with: | |
repository: Gekkio/mooneye-gb | |
path: mooneye-gb | |
- uses: actions/checkout@v2 | |
with: | |
repository: CLowcay/blargg_roms | |
token: ${{ secrets.ROMS_TOKEN }} | |
path: blargg | |
- name: Build WLA-DX | |
run: | | |
cd wla-dx | |
mkdir -p build && cd build | |
cmake .. | |
cmake --build . --config Release | |
- name: Build Mooneye GB Suite | |
env: | |
WLA: ../../wla-dx/build/binaries/wla-gb | |
WLALINK: ../../wla-dx/build/binaries/wlalink | |
run: | | |
cd mooneye-gb/tests | |
make | |
- name: ROM tests | |
env: | |
BLARGG_DIR: blargg | |
MOONEYE_DIR: mooneye-gb | |
run: | | |
chmod +x bin/hgbc-tester | |
bin/hgbc-tester | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: rom-test-results | |
path: hgbc-test-report.html | |
# Deploy ROM test results to netlify | |
upload_test_results: | |
needs: rom_tests | |
if: github.ref == 'refs/heads/master' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
with: | |
name: rom-test-results | |
path: results | |
- name: ROM tests | |
run: | | |
mv results/hgbc-test-report.html results/index.html | |
- name: Deploy to netlify | |
uses: netlify/actions/cli@master | |
env: | |
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | |
NETLIFY_SITE_ID: ${{ secrets.RESULTS_NETLIFY_SITE_ID }} | |
with: | |
args: deploy --dir=results --prod | |
secrets: '["NETLIFY_AUTH_TOKEN", "RESULTS_NETLIFY_SITE_ID"]' |