This repository has been archived by the owner on Nov 14, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add linux-aarch64 GitHub actions via QEMU (#135)
- Loading branch information
Showing
9 changed files
with
167 additions
and
130 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: linter | ||
on: [push, pull_request] | ||
jobs: | ||
cpp-linter: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: cpp-linter/cpp-linter-action@v2 | ||
id: linter | ||
with: | ||
style: file | ||
files-changed-only: false | ||
# TODO: enable clang-tidy checks | ||
tidy-checks: -* | ||
- name: Linter Failed | ||
if: steps.linter.outputs.checks-failed > 0 | ||
run: exit 1 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: test-linux-qemu-aarch64 | ||
on: [push, pull_request] | ||
jobs: | ||
# GitHub action testing of aarch64 on linux under emulation using https://github.com/uraimo/run-on-arch-action | ||
test-linux-qemu-aarch64: | ||
runs-on: ubuntu-latest | ||
env: | ||
SRC_PATH: ${{ github.workspace }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
- uses: uraimo/run-on-arch-action@v2 | ||
name: run commands | ||
with: | ||
arch: aarch64 | ||
distro: ubuntu_latest | ||
setup: | | ||
mkdir -p "$SRC_PATH/build" | ||
dockerRunArgs: | | ||
--volume "$SRC_PATH:/hadron" | ||
install: | | ||
export BUILD_PATH=/hadron/build | ||
apt-get update | ||
apt-get install --yes ninja-build cmake bison ragel gperf build-essential curl git default-jre-headless | ||
git config --global --add safe.directory /hadron | ||
run: | | ||
export BUILD_PATH=/hadron/build | ||
mkdir -p $BUILD_PATH/install-ext/{lib,bin} | ||
cd $BUILD_PATH/install-ext/lib | ||
curl -O https://www.antlr.org/download/antlr-4.11.1-complete.jar | ||
cd $BUILD_PATH | ||
echo $'#!/bin/bash\njava -Xmx500M -cp "${BUILD_PATH}/install-ext/lib/antlr-4.11.1-complete.jar:$CLASSPATH" org.antlr.v4.Tool $@' > $BUILD_PATH/install-ext/bin/antlr4 | ||
chmod a+x $BUILD_PATH/install-ext/bin/antlr4 | ||
cmake -GNinja -DCMAKE_BUILD_TYPE=Debug -DANTLR_COMMAND_LINE=$BUILD_PATH/install-ext/bin/antlr4 .. | ||
cmake --build . | ||
ctest -C Debug -T test --output-on-failure |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: test-linux-x86_64 | ||
on: [push, pull_request] | ||
jobs: | ||
test-linux-x86_64: | ||
runs-on: ubuntu-latest | ||
env: | ||
BUILD_PATH: ${{ github.workspace }}/build | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
- name: install dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install --yes ninja-build cmake bison ragel gperf build-essential | ||
mkdir -p $BUILD_PATH/install-ext/{lib,bin} | ||
cd $BUILD_PATH/install-ext/lib | ||
curl -O https://www.antlr.org/download/antlr-4.11.1-complete.jar | ||
cd $BUILD_PATH | ||
echo '#!/bin/bash | ||
java -Xmx500M -cp "${BUILD_PATH}/install-ext/lib/antlr-4.11.1-complete.jar:$CLASSPATH" org.antlr.v4.Tool $@' > $BUILD_PATH/install-ext/bin/antlr4 | ||
chmod u+x $BUILD_PATH/install-ext/bin/antlr4 | ||
- name: configure | ||
run: | | ||
cd $BUILD_PATH | ||
cmake -GNinja -DCMAKE_BUILD_TYPE=Debug -DANTLR_COMMAND_LINE=$BUILD_PATH/install-ext/bin/antlr4 .. | ||
- name: build | ||
run: | | ||
cd $BUILD_PATH | ||
cmake --build . | ||
- name: test | ||
run: | | ||
cd $BUILD_PATH | ||
ctest -C Debug -T test --output-on-failure |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: test-macos-x86_64 | ||
on: [push, pull_request] | ||
jobs: | ||
test-macos-x86_64: | ||
runs-on: macos-latest | ||
env: | ||
BUILD_PATH: ${{ github.workspace }}/build | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
- name: install dependencies | ||
run: | | ||
brew install cmake bison gperf ragel antlr ninja | ||
- name: configure | ||
run: | | ||
mkdir $BUILD_PATH && cd $BUILD_PATH | ||
cmake -GNinja -DCMAKE_BUILD_TYPE=Debug .. | ||
- name: build | ||
run: | | ||
cd $BUILD_PATH | ||
cmake --build . | ||
- name: test | ||
run: | | ||
cd $BUILD_PATH | ||
ctest -C Debug -T test --output-on-failure |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: test-windows-x86_64 | ||
on: [push, pull_request] | ||
jobs: | ||
test-windows-x86_64: | ||
runs-on: windows-latest | ||
env: | ||
BUILD_PATH: ${{ github.workspace }}\build | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
- name: install dependencies | ||
shell: bash | ||
run: | | ||
vcpkg install --triplet x64-windows ragel gperf | ||
mkdir -p $BUILD_PATH/install-ext/{lib,bin} | ||
cd $BUILD_PATH/install-ext/lib | ||
curl -O https://www.antlr.org/download/antlr-4.11.1-complete.jar | ||
cd $BUILD_PATH | ||
export NEWER_JAVA=`where java | tail -n1` | ||
echo "\"$NEWER_JAVA\" -cp \"$BUILD_PATH\\install-ext\\lib\\antlr-4.11.1-complete.jar\" org.antlr.v4.Tool %*" > $BUILD_PATH/install-ext/bin/antlr4.bat | ||
- name: configure | ||
shell: bash | ||
run: | | ||
cd $BUILD_PATH | ||
cmake -DCMAKE_TOOLCHAIN_FILE=$VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake -DANTLR_COMMAND_LINE=$BUILD_PATH/install-ext/bin/antlr4.bat -DCMAKE_GENERATOR_PLATFORM=x64 -DCMAKE_BUILD_TYPE=Debug .. | ||
- name: build | ||
shell: bash | ||
run: | | ||
cd $BUILD_PATH | ||
cmake --build . --config=Debug | ||
- name: test | ||
shell: bash | ||
run: | | ||
cd $BUILD_PATH | ||
ctest -C Debug -T test --output-on-failure |
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
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
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