-
Notifications
You must be signed in to change notification settings - Fork 7
61 lines (57 loc) · 1.87 KB
/
github_actions.yml
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
name: Github Actions
on:
pull_request:
branches: [main]
jobs:
# run riscv tests
host_x86:
runs-on: ubuntu-20.04
steps:
- name: checkout code
uses: actions/checkout@v3.2.0
- name: build artifact
run: |
sudo apt-get update -y
sudo apt-get install -y gcc-riscv64-linux-gnu
wget https://github.com/riscv-collab/riscv-gnu-toolchain/releases/download/2023.10.18/riscv64-musl-ubuntu-20.04-gcc-nightly-2023.10.18-nightly.tar.gz
sudo mkdir /opt/riscv
sudo tar -xzf riscv64-musl-ubuntu-20.04-gcc-nightly-2023.10.18-nightly.tar.gz -C /opt/riscv/
export PATH=$PATH:/opt/riscv/bin
riscv64-unknown-elf-gcc -v
make CROSS_COMPILE=riscv64-linux-elf- test || exit 1 # riscv64
# for validate test cases
# host_arm:
# runs-on: ubuntu-20.04
# strategy:
# matrix:
# arch: [armv7, aarch64]
# cxx_compiler: [g++-10, clang++-11]
# steps:
# - name: checkout code
# uses: actions/checkout@v3.2.0
# - name: build artifact
# # The Github Action for non-x86 CPU
# # https://github.com/uraimo/run-on-arch-action
# uses: uraimo/run-on-arch-action@v2.5.0
# with:
# arch: ${{ matrix.arch }}
# distro: ubuntu20.04
# env: |
# CXX: ${{ matrix.cxx_compiler }}
# install: |
# apt-get update -q -y
# apt-get install -q -y "${{ matrix.cxx_compiler }}" make
# apt-get install -q -y gcc
# run: |
# make check
coding_style:
runs-on: ubuntu-20.04
steps:
- name: checkout code
uses: actions/checkout@v3.2.0
- name: style check
# clang-format version should be set
run: |
sudo apt-get install -q -y clang-format
sh scripts/check-format.sh
shell: bash