Skip to content

Commit

Permalink
Upgrade the build process via GitHub Actions
Browse files Browse the repository at this point in the history
This commit upgrades the build process by
replacing the previous approach with a new
one, using a single GitHub Action.

Signed-off-by: Rafael Sene <rafael@riscv.org>
  • Loading branch information
rpsene committed Jun 10, 2024
1 parent 7ff6d94 commit b17b4dc
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 85 deletions.
34 changes: 0 additions & 34 deletions .github/workflows/compile.yml

This file was deleted.

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

on: [push, pull_request, workflow_dispatch]

jobs:
build:
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
51 changes: 0 additions & 51 deletions .github/workflows/test-results.yml

This file was deleted.

0 comments on commit b17b4dc

Please sign in to comment.