You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

87 lines
2.3 KiB

name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
jobs:
lint:
strategy:
matrix:
toolchain:
- nightly-2023-06-01
runs-on: ubuntu-latest
container: devkitpro/devkitarm
steps:
- name: Checkout branch
uses: actions/checkout@v4
- uses: ./setup
with:
toolchain: ${{ matrix.toolchain }}
- name: Check formatting
working-directory: test-runner
run: cargo fmt --all --verbose -- --check
- name: Run clippy
working-directory: test-runner
run: cargo 3ds clippy --color=always --verbose --all-targets
test:
strategy:
matrix:
toolchain:
# Oldest supported nightly
- nightly-2023-06-01
- nightly
continue-on-error: ${{ matrix.toolchain == 'nightly' }}
runs-on: ubuntu-latest
container:
image: devkitpro/devkitarm
volumes:
# So the test action can `docker run` the runner:
- '/var/run/docker.sock:/var/run/docker.sock'
steps:
- name: Checkout branch
uses: actions/checkout@v4
- uses: ./setup
with:
toolchain: ${{ matrix.toolchain }}
- name: Build and run tests (unit + integration)
uses: ./run-tests
with:
working-directory: test-runner
args: -- -v
# TODO(#4): run these suckers
# - name: Build and run doc tests
# # Let's still run doc tests even if lib/integration tests fail:
# if: ${{ !cancelled() }}
# env:
# # This ensures the citra logs and video output gets put in a directory
# # where we can upload as artifacts
# RUSTDOCFLAGS: " --persist-doctests ${{ env.GITHUB_WORKSPACE }}/target/armv6k-nintendo-3ds/debug/doctests"
# uses: ./run-tests
# with:
# working-directory: test-runner
# args: --doc -- -v
- name: Upload citra logs and capture videos
uses: actions/upload-artifact@v3
# We always want to upload artifacts regardless of previous success/failure
if: ${{ !cancelled() }}
with:
name: citra-logs-${{ matrix.toolchain }}
path: |
target/armv6k-nintendo-3ds/debug/**/*.txt
target/armv6k-nintendo-3ds/debug/**/*.webm