Skip to content

Commit

Permalink
feat: Enable CI in cross compiled environment
Browse files Browse the repository at this point in the history
  • Loading branch information
howjmay committed Oct 18, 2023
1 parent 1017a35 commit 3ae6cac
Showing 1 changed file with 38 additions and 20 deletions.
58 changes: 38 additions & 20 deletions .github/workflows/github_actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,49 @@ on:
branches: [main]

jobs:
# for validate test cases
host_arm:
# run riscv tests
host_x86:
runs-on: ubuntu-20.04
strategy:
matrix:
arch: [armv7, aarch64]
cxx_compiler: [g++-10, clang++-11]
steps:
- name: checkout code
uses: actions/[email protected]
- name: build artifact
# The Github Action for non-x86 CPU
# https://github.com/uraimo/run-on-arch-action
uses: uraimo/[email protected]
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
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-elf-ubuntu-20.04-gcc-nightly-2023.10.18-nightly.tar.gz
sudo mkdir /opt/riscv
sudo tar -xzf riscv64-elf-ubuntu-20.04-gcc-nightly-2023.10.18-nightly.tar.gz -C /opt/
export PATH=$PATH:/opt/riscv/bin
ls /opt/riscv/bin/
riscv64-unknown-elf-gcc -v
make CROSS_COMPILE=riscv64-unknown-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/[email protected]
# - name: build artifact
# # The Github Action for non-x86 CPU
# # https://github.com/uraimo/run-on-arch-action
# uses: uraimo/[email protected]
# 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
Expand Down

0 comments on commit 3ae6cac

Please sign in to comment.