Skip to content
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

Upgrade the build process via GitHub Actions #493

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
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
34 changes: 0 additions & 34 deletions .github/workflows/compile.yml

This file was deleted.

66 changes: 66 additions & 0 deletions .github/workflows/sail-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: SAIL CI

on: [push, pull_request, workflow_dispatch]

jobs:
build:
if: github.repository == 'rpsene/sail-riscv'
runs-on: ubuntu-22.04

steps:
- name: Check out repository code
uses: actions/checkout@v4
with:
submodules: true

- name: Install dependencies
id: install_dependencies
run: |
sudo apt update
sudo apt install -y opam zlib1g-dev pkg-config libgmp-dev z3 device-tree-compiler
pip install pre-commit

- name: Ensure pre-commit checks pass
id: pre_commit
run: pre-commit run --all-files --show-diff-on-failure --color=always

- name: Init opam
id: init_opam
run: opam init --disable-sandboxing -y

- name: Install sail
id: install_sail
run: opam install -y sail

- name: Build and test simulators
if: steps.install_dependencies.outcome == 'success' && steps.pre_commit.outcome == 'success' && steps.init_opam.outcome == 'success' && steps.install_sail.outcome == 'success'
id: build_test_simulators
run: eval $(opam env) && test/run_tests.sh

- name: Upload test.xml
id: upload_test_xml
if: steps.build_test_simulators.outcome == 'success'
uses: actions/upload-artifact@v4
with:
name: tests.xml
path: test/tests.xml

- name: Upload event.json
id: upload_event_json
if: steps.build_test_simulators.outcome == 'success'
uses: actions/upload-artifact@v4
with:
name: event.json
path: ${{ github.event_path }}

- name: Publish Test Results
if: steps.build_test_simulators.outcome == 'success'
uses: EnricoMi/publish-unit-test-result-action@v2
with:
files: |
test/tests.xml

- name: PR comment with file
uses: thollander/actions-comment-pull-request@v2
with:
filePath: /path/to/file.txt
51 changes: 0 additions & 51 deletions .github/workflows/test-results.yml

This file was deleted.