-
Notifications
You must be signed in to change notification settings - Fork 167
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade the build process via GitHub Actions
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
Showing
3 changed files
with
60 additions
and
85 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file was deleted.
Oops, something went wrong.