Skip to content

Commit 1ed55f8

Browse files
committed
nightly ci
1 parent 195075a commit 1ed55f8

1 file changed

Lines changed: 82 additions & 0 deletions

File tree

.github/workflows/nightly.yml

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
name: Rust-PSP Nightly Pipeline
2+
on:
3+
schedule:
4+
- cron: "* 21 * * *"
5+
workflow_dispatch:
6+
7+
env:
8+
GHA_RUN_URL: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
9+
10+
jobs:
11+
build:
12+
runs-on: [ubuntu-latest]
13+
env:
14+
RUSTUP_TOOLCHAIN: nightly
15+
steps:
16+
- name: Checkout sources
17+
uses: actions/checkout@v7
18+
19+
- name: Install Rust
20+
uses: dtolnay/rust-toolchain@stable
21+
with:
22+
toolchain: ${{ env.RUSTUP_TOOLCHAIN }}
23+
components: clippy, rust-src
24+
25+
- name: Setup Cache
26+
uses: Swatinem/rust-cache@v2
27+
28+
- name: Build Cargo-PSP on Nightly
29+
run: cargo install --path ./cargo-psp
30+
31+
- name: Build Test Project for PSP on Nightly
32+
run: |
33+
cargo psp --manifest-path=./ci/tests/Cargo.toml
34+
35+
- name: Discord Webhook Action
36+
if: failure()
37+
run: |
38+
BODY='{"username": "GitHub Actions", "content": "Rust-PSP Failed with latest nightly\r\n${{ env.GHA_RUN_URL }}"}'
39+
curl \
40+
-H "Content-Type: application/json" \
41+
-d "${BODY}" \
42+
${{ secrets.DISCORD_WEBHOOK_URL }}
43+
44+
45+
- name: Upload Artifacts
46+
uses: actions/upload-artifact@v7
47+
with:
48+
name: nightly-psp-ci-test
49+
path: target/mipsel-sony-psp/debug/test_cases.EBOOT.PBP
50+
51+
52+
run-tests:
53+
needs: build
54+
runs-on: ubuntu-latest
55+
container: rustpsp/ppsspp-headless:latest
56+
steps:
57+
- name: Download Artifact
58+
uses: actions/download-artifact@v8
59+
with:
60+
name: nightly-psp-ci-test
61+
- name: Run Tests
62+
id: test
63+
shell: bash
64+
run: |
65+
set -euo pipefail
66+
/ppsspp/build-sdl/PPSSPPHeadless --graphics=software ./test_cases.EBOOT.PBP --timeout=10 -r .
67+
cat psp_output_file.log
68+
if [ "$(tail -n 1 psp_output_file.log)" = "FINAL_SUCCESS" ]; then
69+
echo Test passed
70+
else
71+
exit 1
72+
fi
73+
- name: Discord Webhook Action
74+
if: failure()
75+
run: |
76+
BODY='{"username": "GH Actions", "content": "Rust-PSP Failed with latest nightly\r\n${{ env.GHA_RUN_URL }}"}'
77+
curl \
78+
-H "Content-Type: application/json" \
79+
-d "${BODY}" \
80+
${{ secrets.DISCORD_WEBHOOK_URL }}
81+
82+

0 commit comments

Comments
 (0)