Skip to content

Speed up host-arm workflow via native execution on Arm64 runners #1175

Speed up host-arm workflow via native execution on Arm64 runners

Speed up host-arm workflow via native execution on Arm64 runners #1175

Workflow file for this run

name: Github Actions
on: [push, pull_request]
jobs:
host-x86:
runs-on: ubuntu-24.04
strategy:
matrix:
compiler: [gcc, clang]
architecture: [arm, riscv]
link_mode: [static]
include:
- compiler: gcc
architecture: arm
link_mode: dynamic
- compiler: clang
architecture: arm
link_mode: dynamic
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Download dependencies
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
sudo apt-get install -q -y gcc-arm-linux-gnueabihf
- name: Determine static or dynamic linking mode
id: determine-mode
run: |
if [ "${{ matrix.link_mode }}" = "dynamic" ]; then
echo "Use dynamic linking mode"
echo "DYNLINK=1" >> "$GITHUB_OUTPUT"
else
echo "Use static linking mode"
echo "DYNLINK=0" >> "$GITHUB_OUTPUT"
fi
- name: Build artifacts
env:
CC: ${{ matrix.compiler }}
run: |
make ARCH=${{ matrix.architecture }} DYNLINK=${{ steps.determine-mode.outputs.DYNLINK }}
- name: IR regression tests
run: |
make check-snapshot DYNLINK=${{ steps.determine-mode.outputs.DYNLINK }} || exit 1
- name: Sanitizer-enabled stage 0 tests
env:
CC: ${{ matrix.compiler }}
run: |
make check-sanitizer DYNLINK=${{ steps.determine-mode.outputs.DYNLINK }} || exit 1
- name: Unit tests
run: |
make check DYNLINK=${{ steps.determine-mode.outputs.DYNLINK }} || exit 1
host-arm:
runs-on: ubuntu-24.04-arm
strategy:
matrix:
link_mode: [static, dynamic]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Download dependencies
run: |
sudo dpkg --add-architecture armhf
sudo apt-get update -q -y
sudo apt-get install -q -y graphviz jq
sudo apt-get install -q -y build-essential libc6:armhf
sudo apt-get install -q -y python3
- name: Determine static or dynamic linking mode
id: determine-mode
run: |
if [ "${{ matrix.link_mode }}" = "dynamic" ]; then
echo "Use dynamic linking mode"
echo "DYNLINK=1" >> "$GITHUB_OUTPUT"
else
echo "Use static linking mode"
echo "DYNLINK=0" >> "$GITHUB_OUTPUT"
fi
- name: Build artifacts
run: |
make ARCH=arm DYNLINK=${{ steps.determine-mode.outputs.DYNLINK }}
- name: Sanitizer-enabled stage 0 tests
run: |
make check-sanitizer DYNLINK=${{ steps.determine-mode.outputs.DYNLINK }} || exit 1
- name: Unit tests
run: |
make check DYNLINK=${{ steps.determine-mode.outputs.DYNLINK }} || exit 1
coding-style:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Coding convention
run: |
sudo apt-get install -q -y clang-format-18
.ci/check-newline.sh
.ci/check-format.sh
shell: bash