Skip to content

updated paw

updated paw #97

Workflow file for this run

name: CI on Linux
on:
# Trigger workflow on pull requests of any branch
pull_request:
# Trigger workflow on pushes to following branches
push:
branches:
- master
- dev
env:
TZ: Atlantic/Reykjavik
defaults:
run:
shell: bash -ex {0}
jobs:
build:
name: ${{ matrix.name }}
runs-on: ubuntu-22.04
timeout-minutes: 120
strategy:
fail-fast: false
matrix:
include:
- name: "GCC9 Debug"
pkg: "g++-9"
cxx: "g++-9"
cc: "gcc-9"
build_type: Debug
- name: "GCC9 Release"
pkg: "g++-9"
cxx: "g++-9"
cc: "gcc-9"
build_type: Release
- name: "GCC10 Debug C++20"
pkg: "g++-10"
cxx: "g++-10"
cc: "gcc-10"
cxx_flags: "-std=c++20"
build_type: Debug
- name: "GCC11 Release C++20"
pkg: "g++-11"
cxx: "g++-11"
cc: "gcc-11"
cxx_flags: "-std=c++20"
build_type: Release
- name: "Clang12 Release C++20"
pkg: "clang-12"
cxx: "clang++-12"
cc: "clang-12"
cxx_flags: "-std=c++20"
build_type: Release
- name: "Clang16 Release C++20"
pkg: "clang-16"
cxx: "clang++-16"
cc: "clang-16"
cxx_flags: "-std=c++20"
build_type: Release
steps:
- name: Checkout
uses: actions/checkout@v2
with:
path: src
fetch-depth: 2
submodules: recursive
- name: Add package source
run: |
echo 'APT::Acquire::Retries "5";' | sudo tee -a /etc/apt/apt.conf.d/80-retries > /dev/null
sudo add-apt-repository --no-update --yes ppa:ubuntu-toolchain-r/ppa
sudo add-apt-repository --no-update --yes ppa:ubuntu-toolchain-r/test
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo add-apt-repository --no-update --yes "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy main"
sudo add-apt-repository --no-update --yes "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-15 main"
sudo add-apt-repository --no-update --yes "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-16 main"
sudo apt-get update
- name: Install Build dependencies
run: sudo apt-get install --yes cmake ccache
- name: Install compiler ${{ matrix.name }}
run: sudo apt-get install --yes ${{ matrix.pkg }}
- name: Load ccache
uses: actions/cache@v2
with:
path: .ccache
key: ${{ runner.os }}-${{ matrix.name }}-ccache-${{ github.ref }}-${{ github.run_number }}
# Restoring: From current branch, otherwise from base branch, otherwise from any branch.
restore-keys: |
${{ runner.os }}-${{ matrix.name }}-ccache-${{ github.ref }}
${{ runner.os }}-${{ matrix.name }}-ccache-${{ github.base_ref }}
${{ runner.os }}-${{ matrix.name }}-ccache-
- name: Tool versions
run: |
env cmake --version
env ${{ matrix.cxx }} --version
- name: Configure tests
env:
CXX: ${{ matrix.cxx }}
CC: ${{ matrix.cc }}
run: |
mkdir build
cd build
cmake ../src -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_CXX_FLAGS="${{ matrix.cxx_flags }}"
- name: Build tests
env:
CCACHE_BASEDIR: ${{ github.workspace }}
CCACHE_DIR: ${{ github.workspace }}/.ccache
CCACHE_COMPRESS: true
CCACHE_COMPRESSLEVEL: 6
CCACHE_MAXSIZE: 500M
run: |
ccache -p || true
cd build
make -k -j2
ccache -s || true
- name: Run tests
run: |
cd build
make test
build-aarch64:
name: Linux ARM64 - GCC9 Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: Build
uses: uraimo/run-on-arch-action@v2
with:
arch: aarch64
distro: ubuntu20.04
githubToken: ${{ github.token }}
dockerRunArgs: |
--volume "${PWD}:/graphtyper"
install: |
apt-get update -q -y
apt-get install -q -y autoconf gcc g++ git make cmake libboost-all-dev liblzma-dev libbz2-dev libz-dev
run: |
git config --global --add safe.directory /graphtyper
git config --global --add safe.directory /graphtyper/paw
cd /graphtyper
mkdir release-build
cd release-build
echo "Running 'cmake .. -Dpaw_BUILD_FLAGS="-DCMAKE_CXX_FLAGS_ARCH=-march=native" -DCMAKE_BUILD_TYPE=Release'"
cmake .. -Dpaw_BUILD_FLAGS="-DCMAKE_CXX_FLAGS_ARCH=-march=native" -DCMAKE_BUILD_TYPE=Release
echo "Running 'make -k -j2'"
make -k -j2
file ./bin/graphtyper | grep aarch64
echo "Running the tests..."
make test