Skip to content

Commit 09af9d5

Browse files
committed
CI: test ./build_emulators.sh
Signed-off-by: Ariel Xiong <[email protected]>
1 parent a811d52 commit 09af9d5

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

.github/workflows/scripts.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: CI with script
2+
3+
on: [push, pull_request, workflow_dispatch]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Install packages
10+
run: sudo apt install -y --no-install-recommends pkg-config curl
11+
12+
- name: Install sail from binary
13+
run: |
14+
sudo mkdir -p /usr/local
15+
curl --location https://github.com/rems-project/sail/releases/download/0.19-linux-binary/sail.tar.gz | sudo tar xvz --directory=/usr/local --strip-components=1
16+
17+
- name: Check out repository code
18+
uses: actions/checkout@v4
19+
20+
- name: Build simulator
21+
run: ./build_simulators.sh
22+
# Build with ./build_emulators.sh
23+
24+
- name: Test simulator
25+
run: ctest --test-dir build --output-junit tests.xml --output-on-failure
26+
27+
- name: Upload test results
28+
if: always()
29+
uses: actions/upload-artifact@v4
30+
with:
31+
name: tests.xml
32+
path: build/tests.xml
33+
if-no-files-found: error
34+
35+
- name: Upload event payload
36+
if: always()
37+
uses: actions/upload-artifact@v4
38+
with:
39+
name: event.json
40+
path: ${{ github.event_path }}

0 commit comments

Comments
 (0)