Skip to content

Commit f22666e

Browse files
authored
Run Multiple CI jobs in parallel (#522)
* Use matrix to run multiple CI jobs in parallel * Only build one version of Sail simulator
1 parent 4712129 commit f22666e

File tree

1 file changed

+11
-24
lines changed

1 file changed

+11
-24
lines changed

.github/workflows/test.yml

Lines changed: 11 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ on:
2525
jobs:
2626

2727
ACT-sail-spike:
28+
name: ACT-sail-spike (RV${{ matrix.xlen }})
2829
runs-on: ubuntu-22.04
2930
strategy:
3031
fail-fast: false
3132
matrix:
32-
isa_group:
33-
- RVIMAFDCZicsr_Zifencei
33+
xlen: [32, 64]
3434

3535
steps:
3636

@@ -45,19 +45,12 @@ jobs:
4545
sudo apt-get install autoconf automake autotools-dev curl python3 python3-pip libmpc-dev libmpfr-dev libgmp-dev gawk build-essential bison flex texinfo gperf libtool patchutils bc zlib1g-dev libexpat-dev ninja-build git cmake libglib2.0-dev libslirp-dev pkg-config
4646
pip3 install git+https://github.com/riscv/riscof.git
4747
48-
- name: Build RISCV-GNU Toolchain (32 bit)
48+
- name: Build RISCV-GNU Toolchain (${{ matrix.xlen }} bit)
4949
run: |
50-
wget -c https://github.com/riscv-collab/riscv-gnu-toolchain/releases/download/2024.09.03/riscv32-elf-ubuntu-20.04-gcc-nightly-2024.09.03-nightly.tar.gz
51-
tar -xzf riscv32-elf-ubuntu-20.04-gcc-nightly-2024.09.03-nightly.tar.gz
52-
mv riscv riscv32
53-
echo $GITHUB_WORKSPACE/riscv32/bin >> $GITHUB_PATH
54-
55-
- name: Build RISCV-GNU Toolchain (64 bit)
56-
run: |
57-
wget -c https://github.com/riscv-collab/riscv-gnu-toolchain/releases/download/2024.09.03/riscv64-elf-ubuntu-20.04-gcc-nightly-2024.09.03-nightly.tar.gz
58-
tar -xzf riscv64-elf-ubuntu-20.04-gcc-nightly-2024.09.03-nightly.tar.gz
59-
mv riscv riscv64
60-
echo $GITHUB_WORKSPACE/riscv64/bin >> $GITHUB_PATH
50+
wget -c https://github.com/riscv-collab/riscv-gnu-toolchain/releases/download/2024.09.03/riscv${{ matrix.xlen }}-elf-ubuntu-20.04-gcc-nightly-2024.09.03-nightly.tar.gz
51+
tar -xzf riscv${{ matrix.xlen }}-elf-ubuntu-20.04-gcc-nightly-2024.09.03-nightly.tar.gz
52+
mv riscv riscv${{ matrix.xlen }}
53+
echo $GITHUB_WORKSPACE/riscv${{ matrix.xlen }}/bin >> $GITHUB_PATH
6154
6255
- name: Install riscv-isac
6356
run: |
@@ -87,16 +80,10 @@ jobs:
8780
curl --location https://github.com/rems-project/sail/releases/download/0.18-linux-binary/sail.tar.gz | sudo tar xvz --directory=/usr/local --strip-components=1
8881
git clone https://github.com/riscv/sail-riscv.git
8982
cd sail-riscv
90-
ARCH=RV32 make
91-
ARCH=RV64 make
83+
ARCH=RV${{ matrix.xlen }} make
9284
echo $PWD/c_emulator >> $GITHUB_PATH
9385
94-
- name: Config and run riscof for RV32
95-
run: |
96-
cd riscof-plugins/rv32
97-
riscof run --config config.ini --suite ../../riscv-test-suite/rv32i_m/ --env ../../riscv-test-suite/env
98-
99-
- name: Config and run riscof for RV64
86+
- name: Config and run riscof for RV${{ matrix.xlen }}
10087
run: |
101-
cd riscof-plugins/rv64
102-
riscof run --config config.ini --suite ../../riscv-test-suite/rv64i_m/ --env ../../riscv-test-suite/env
88+
cd riscof-plugins/rv${{ matrix.xlen }}
89+
riscof run --config config.ini --suite ../../riscv-test-suite/rv${{ matrix.xlen }}i_m/ --env ../../riscv-test-suite/env

0 commit comments

Comments
 (0)