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
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: ./actions/setup |
|
with: |
|
toolchain: ${{ matrix.toolchain }} |
|
|
|
- name: Check formatting |
|
run: cargo fmt --all --verbose -- --check |
|
|
|
- name: Run clippy |
|
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' |
|
# So the built test artifacts end up on the host, not just inside the action container |
|
- '/tmp:/tmp' |
|
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 |
|
|
|
- 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 target/armv6k-nintendo-3ds/debug/doctests" |
|
uses: ./run-tests |
|
with: |
|
working-directory: test-runner |
|
# TODO(#4): run them suckers |
|
args: --doc --no-run -- -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
|
|
|