Skip to content

CI: test ./build_emulators.sh #876

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .github/workflows/scripts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: CI with script
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
name: CI with script
name: Test build_emulators.sh script


on: [push, pull_request, workflow_dispatch]

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Install packages
run: sudo apt install -y --no-install-recommends pkg-config curl

- name: Install sail from binary
run: |
sudo mkdir -p /usr/local
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

- name: Check out repository code
uses: actions/checkout@v4

- name: Build simulator
run: ./build_simulators.sh
# Build with ./build_emulators.sh
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# Build with ./build_emulators.sh


- name: Test simulator
run: ctest --test-dir build --output-junit tests.xml --output-on-failure

- name: Upload test results
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we don't need to upload the test results/event payload since the other workflow will already do this.

if: always()
uses: actions/upload-artifact@v4
with:
name: tests.xml
path: build/tests.xml
if-no-files-found: error

- name: Upload event payload
if: always()
uses: actions/upload-artifact@v4
with:
name: event.json
path: ${{ github.event_path }}
Loading