Merge pull request #173 from AW-AlanWu/master #416
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
name: Github Actions | |
on: [push, pull_request] | |
jobs: | |
host-x86: | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
compiler: [gcc-12, clang] | |
architecture: [arm, riscv] | |
steps: | |
- name: checkout code | |
uses: actions/checkout@v4 | |
- name: build artifact | |
env: | |
CC: ${{ matrix.compiler }} | |
run: | | |
sudo apt-get update -q -y | |
sudo apt-get install -q -y graphviz jq | |
sudo apt-get install -q -y qemu-user | |
sudo apt-get install -q -y build-essential | |
make distclean config ARCH=${{ matrix.architecture }} | |
make check-snapshot || exit 1 | |
make check || exit 1 | |
host-arm: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: checkout code | |
uses: actions/checkout@v4 | |
- 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 | |
with: | |
arch: none | |
distro: none | |
base_image: "--platform=linux/arm/v7 arm32v7/ubuntu:22.04" | |
install: | | |
apt-get update -q -y | |
apt-get install -q -y build-essential | |
run: | | |
make config ARCH=arm | |
make check || exit 1 | |
coding-style: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: coding convention | |
run: | | |
sudo apt-get install -q -y clang-format-12 | |
.ci/check-newline.sh | |
.ci/check-format.sh | |
shell: bash |