name: CI on: push: branches: - main pull_request: branches: - main workflow_dispatch: jobs: lint: strategy: matrix: toolchain: - nightly-2024-02-18 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-2024-02-18 - 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 - name: Build and run doc tests # Still run doc tests even if lib/integration tests fail: if: ${{ !cancelled() }} env: # This ensures the citra logs and video output get persisted to a # directory where the artifact upload can find them. RUSTDOCFLAGS: " --persist-doctests 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: | test-runner/target/armv6k-nintendo-3ds/debug/**/*.txt test-runner/target/armv6k-nintendo-3ds/debug/**/*.webm