Skip to content

adjust ci

adjust ci #168

Workflow file for this run

name: build
on: [push, pull_request]
jobs:
python:
name: "Python Tests"
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: pre-commit checks - setup cache
uses: actions/cache@v3
with:
path: ~/.cache/pre-commit
key: pre-commit|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }}
- name: pre-commit checks - run checks
uses: pre-commit/[email protected]
C:
name: "C Builds"
strategy:
fail-fast: false
matrix:
arch: [x86, arm32, arm64, riscv32, riscv64]
compiler: [llvm-12, llvm-13, llvm-14, llvm-15 llvm-16]
include:
- arch: x86
compiler: gcc-9
- arch: x86
compiler: gcc-10
- arch: x86
compiler: gcc-11
- arch: x86
compiler: gcc-12
- arch: x86
compiler: gcc-13
- arch: x86
compiler: clang-12
- arch: x86
compiler: clang-13
- arch: x86
compiler: clang-14
- arch: arm32
compiler: gcc-arm-linux-gnueabihf
- arch: arm64
compiler: gcc-aarch64-linux-gnu
- arch: riscv64
compiler: gcc-riscv64-linux-gnu
runs-on: ubuntu-22.04
steps:
- name: Install
run: |
c=${{matrix.compiler}}
v=${c##llvm-}
case $c in
# Need all {llvm,clang,lld}-$v packages
llvm-*) EXTRA="clang-${v} lld-${v}" ;;
esac
sudo apt-get update -q
sudo apt-get install -y build-essential python3 ${{matrix.compiler}} ${EXTRA}
- uses: actions/checkout@v3
- name: Build
run: |
a=${{matrix.arch}}
c=${{matrix.compiler}}
# Select appropriate CROSS_COMPILE for non-x86 targets
case $a in
arm32) CROSS="CROSS_COMPILE=arm-linux-gnueabihf-" ;;
arm64) CROSS="CROSS_COMPILE=aarch64-linux-gnu-" ;;
riscv32) CROSS="CROSS_COMPILE=riscv32-linux-gnu-" ;;
riscv64) CROSS="CROSS_COMPILE=riscv64-linux-gnu-" ;;
esac
# Select appropriate LLVM= or CC=
case $c in
llvm-*) COMP="LLVM=${c#llvm}" ;;
*) [[ -z "$CROSS" ]] && COMP="CC=$c" ;;
esac
make -j`nproc` ARCH=$a $CROSS $COMP