move JTAG to its own domain #114
Workflow file for this run
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
# SPDX-FileCopyrightText: 2022 Google LLC | |
# | |
# SPDX-License-Identifier: Apache-2.0 | |
name: CI | |
on: [push] | |
# Updating Rust versions: | |
# | |
# When updating to a newer (or older) version of Rust for the main build process | |
# then the version should be updated in the /rust-toolchain.toml file too. | |
# That file determines which version gets used locally on developer machines. | |
jobs: | |
license-check: | |
runs-on: ubuntu-22.04 | |
container: | |
image: ubuntu:22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: REUSE Compliance Check | |
uses: fsfe/reuse-action@v1 | |
rust-checks: | |
name: Rust checks | |
runs-on: ubuntu-22.04 | |
container: | |
image: ubuntu:22.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install dependencies | |
run: | | |
apt-get update | |
apt-get install -y curl build-essential | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: 1.67 # See Note [Updating Rust versions] | |
profile: minimal | |
target: riscv32imc-unknown-none-elf | |
components: clippy, rustfmt | |
- name: Rust formatting | |
uses: actions-rs/cargo@v1 | |
with: | |
command: fmt | |
args: --all -- --check | |
- uses: actions-rs/clippy-check@v1 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
args: --target riscv32imc-unknown-none-elf --all-features | |
rust-build-programs: | |
name: Build Programs | |
runs-on: ubuntu-22.04 | |
container: | |
image: ubuntu:22.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install dependencies | |
run: | | |
apt-get update | |
apt-get install -y curl build-essential | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: 1.67.1 # See Note [Updating Rust versions] | |
profile: minimal | |
target: riscv32imc-unknown-none-elf | |
components: clippy, rustfmt | |
- name: Build release binaries | |
uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
args: --release | |
- name: Build debug binaries | |
uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
- name: Archive Integration Test Binaries | |
run: | | |
cd clash-vexriscv-sim; sh bundle_test_binaries.sh | |
- name: Upload Integration Test Binaries | |
uses: actions/upload-artifact@v2 | |
with: | |
name: vexriscv-test-binaries | |
path: clash-vexriscv-sim/vexriscv-test-binaries.tar | |
vex-riscv: | |
name: VexRiscv integration | |
runs-on: ubuntu-22.04 | |
needs: [rust-build-programs] | |
container: | |
image: ghcr.io/clash-lang/clash-ci-9.0.2:2022-12-13 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v1 | |
- name: Update Cabal index info | |
run: | | |
cabal update | |
cabal freeze | |
- name: Cache | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/.cabal/store | |
key: packages-cachebust-1-${{ hashFiles('cabal.project.freeze') }} | |
restore-keys: packages-cachebust-1- | |
- name: Install build deps | |
run: | | |
apt-get update | |
apt-get install gnupg pkg-config -y | |
- name: Install Java | |
run: | | |
# install Java 8 | |
apt-get update | |
apt-get install openjdk-8-jdk -y | |
update-alternatives --config java | |
update-alternatives --config javac | |
- name: Install SBT | |
run: | | |
echo "deb https://repo.scala-sbt.org/scalasbt/debian all main" | tee /etc/apt/sources.list.d/sbt.list | |
echo "deb https://repo.scala-sbt.org/scalasbt/debian /" | tee /etc/apt/sources.list.d/sbt_old.list | |
curl -sL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x2EE0EA64E40A89B84B2DF73499E82A75642AC823" | apt-key add | |
apt-get update | |
apt-get install sbt -y | |
- name: Build clash-vexriscv | |
run: | | |
export PKG_CONFIG_PATH=/opt/share/pkgconfig/:${PKG_CONFIG_PATH} | |
cabal build clash-vexriscv | |
- name: Build clash-vexriscv-sim | |
run: | | |
cabal build clash-vexriscv-sim | |
- name: Download VexRiscv Integration Tests | |
uses: actions/download-artifact@v2 | |
with: | |
name: vexriscv-test-binaries | |
- name: Extract VexRiscv Integration Tests | |
run: | | |
tar -x -f vexriscv-test-binaries.tar | |
- name: Run unittests | |
run: | | |
cabal run clash-vexriscv-sim:unittests |