-
Notifications
You must be signed in to change notification settings - Fork 3
67 lines (61 loc) · 1.89 KB
/
run-tests.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: Running C tests
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build-x86:
# Do not ignore bash profile files. From:
defaults:
run:
shell: bash -l {0}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Clean previous builds
run: |
rm -rf ./build/
- name: Configure CMake
run: |
cmake -S ./ -B ./build/ -D CMAKE_BUILD_TYPE=Debug
- name: Build
run: |
cmake --build ./build/ --target tests
./build/tests/tests
- name: Run binary
run: |
./build/tests/tests
# build-riscv:
# defaults:
# run:
# shell: bash -l {0}
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# with:
# submodules: recursive
# - name: Set up toolchain
# run: |
# wget https://github.com/ucb-bar/RISC-V-Ready-To-Run/releases/download/v2024.06.04/riscv64-unknown-toolchain.tar.xz
# tar -xf riscv64-unknown-toolchain.tar.xz
# wget https://github.com/ucb-bar/RISC-V-Ready-To-Run/releases/download/v2024.06.04/spike -O $GITHUB_WORKSPACE/riscv64-unknown-toolchain/bin/spike
# chmod +x $GITHUB_WORKSPACE/riscv64-unknown-toolchain/bin/spike
# echo "RISCV=$GITHUB_WORKSPACE/riscv64-unknown-toolchain" >> $GITHUB_ENV
# echo "$GITHUB_WORKSPACE/riscv64-unknown-toolchain/bin" >> $GITHUB_PATH
# - name: Clean previous builds
# run: |
# rm -rf ./build/
# - name: Configure CMake
# run: |
# cmake -S ./ -B ./build/ -D CMAKE_BUILD_TYPE=Debug -D CMAKE_TOOLCHAIN_FILE=./riscv-gcc.cmake
# - name: Build
# run: |
# cmake --build ./build/ --target tests
# - name: Run binary
# run: |
# cmake --build ./build/ --target run_tests