2021-04-13 00:03:17 +00:00
|
|
|
name: Build
|
|
|
|
|
2021-04-08 20:18:20 +00:00
|
|
|
on:
|
|
|
|
push:
|
2021-04-13 00:03:17 +00:00
|
|
|
pull_request:
|
|
|
|
|
2021-04-08 20:18:20 +00:00
|
|
|
jobs:
|
2021-04-13 00:03:17 +00:00
|
|
|
build-linux-x86_64:
|
2021-04-08 20:18:20 +00:00
|
|
|
name: Build Linux (GCC x86_64)
|
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
submodules: recursive
|
|
|
|
|
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
|
|
|
sudo apt-get -y update
|
|
|
|
sudo apt-get -y install cmake ninja-build ccache llvm-11-dev libclang-11-dev clang-11
|
|
|
|
|
|
|
|
- name: Configure ccache
|
|
|
|
uses: hendrikmuhs/ccache-action@v1
|
|
|
|
with:
|
|
|
|
key: ubuntu-20.04-gcc
|
|
|
|
max-size: 1G
|
|
|
|
|
2021-04-12 23:39:36 +00:00
|
|
|
- name: Configure CMake
|
2021-04-08 20:18:20 +00:00
|
|
|
run: |
|
2021-04-12 23:39:36 +00:00
|
|
|
cmake -B build . -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DClang_DIR=/usr/lib/cmake/clang-11 \
|
|
|
|
-DATDNA_DYNAMIC_LLVM=OFF -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
|
|
|
|
|
|
|
|
- name: Build
|
|
|
|
run: cmake --build build --target package --verbose
|
2021-04-08 20:18:20 +00:00
|
|
|
|
|
|
|
- name: Test
|
|
|
|
working-directory: build
|
|
|
|
run: ./atdna-test
|
|
|
|
|
|
|
|
- name: Upload artifacts
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
2021-04-13 00:03:17 +00:00
|
|
|
name: atdna-linux-x86_64
|
2021-04-08 20:18:20 +00:00
|
|
|
path: |
|
2021-04-12 23:39:36 +00:00
|
|
|
build/athena-*.tar.gz
|
2021-04-08 20:18:20 +00:00
|
|
|
|
2021-04-13 00:03:51 +00:00
|
|
|
build-linux-aarch64:
|
2021-04-08 20:18:20 +00:00
|
|
|
name: Build Linux (GCC aarch64)
|
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
submodules: recursive
|
|
|
|
|
|
|
|
- uses: uraimo/run-on-arch-action@v2.0.9
|
2021-04-12 23:39:36 +00:00
|
|
|
name: Build & test
|
2021-04-08 20:18:20 +00:00
|
|
|
with:
|
|
|
|
arch: aarch64
|
|
|
|
distro: ubuntu20.04
|
|
|
|
githubToken: ${{github.token}}
|
|
|
|
dockerRunArgs: |
|
|
|
|
--volume "${PWD}:/workspace"
|
|
|
|
install: |
|
|
|
|
apt-get -y update
|
|
|
|
apt-get -y install build-essential cmake ninja-build llvm-11-dev libclang-11-dev clang-11
|
|
|
|
run: |
|
2021-04-12 23:42:31 +00:00
|
|
|
cmake -B build . -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
|
|
|
-DClang_DIR=/usr/lib/cmake/clang-11 -DATDNA_DYNAMIC_LLVM=OFF
|
2021-04-12 23:39:36 +00:00
|
|
|
cmake --build build --target package --verbose
|
|
|
|
build/atdna-test
|
2021-04-08 20:18:20 +00:00
|
|
|
|
|
|
|
- name: Upload artifacts
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
2021-04-13 00:03:17 +00:00
|
|
|
name: atdna-linux-aarch64
|
2021-04-08 20:18:20 +00:00
|
|
|
path: |
|
2021-04-12 23:39:36 +00:00
|
|
|
build/athena-*.tar.gz
|
2021-04-08 20:18:20 +00:00
|
|
|
|
2021-04-13 00:03:17 +00:00
|
|
|
build-macos-universal:
|
2021-04-08 20:18:20 +00:00
|
|
|
name: Build macOS (AppleClang universal)
|
|
|
|
runs-on: macos-10.15
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
submodules: recursive
|
|
|
|
|
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
2021-04-12 20:12:36 +00:00
|
|
|
brew update
|
2021-04-08 20:18:20 +00:00
|
|
|
brew install ninja ccache
|
|
|
|
# universal clang+llvm from macports
|
|
|
|
curl -LSfs https://axiodl.com/files/clang-11-11.1.0_1.mpkg -o /tmp/clang-11-11.1.0_1.mpkg
|
|
|
|
sudo installer -pkg /tmp/clang-11-11.1.0_1.mpkg -target /
|
|
|
|
|
|
|
|
- name: Configure ccache
|
|
|
|
uses: hendrikmuhs/ccache-action@v1
|
|
|
|
with:
|
|
|
|
key: macos-10.15-appleclang
|
|
|
|
max-size: 1G
|
|
|
|
|
2021-04-12 20:12:36 +00:00
|
|
|
- name: Configure CMake
|
2021-04-08 20:18:20 +00:00
|
|
|
run: |
|
2021-04-12 23:42:31 +00:00
|
|
|
cmake -B build . -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" \
|
2021-04-12 21:19:08 +00:00
|
|
|
-DLLVM_ROOT_DIR=/opt/local/libexec/llvm-11 \
|
2021-04-12 23:42:31 +00:00
|
|
|
-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
|
2021-04-12 20:12:36 +00:00
|
|
|
|
|
|
|
- name: Build
|
2021-04-12 23:39:36 +00:00
|
|
|
run: cmake --build build --target package --verbose
|
2021-04-08 20:18:20 +00:00
|
|
|
|
|
|
|
- name: Test
|
|
|
|
working-directory: build
|
|
|
|
run: ./atdna-test
|
|
|
|
|
|
|
|
- name: Upload artifacts
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
2021-04-13 00:03:17 +00:00
|
|
|
name: athena-macos-universal
|
2021-04-08 20:18:20 +00:00
|
|
|
path: |
|
2021-04-12 23:39:36 +00:00
|
|
|
build/athena-*.tar.gz
|
2021-04-12 20:12:36 +00:00
|
|
|
|
2021-04-13 00:03:17 +00:00
|
|
|
build-win32-amd64:
|
|
|
|
name: Build Windows (MSVC AMD64)
|
2021-04-12 20:12:36 +00:00
|
|
|
runs-on: windows-2019
|
|
|
|
env:
|
|
|
|
LLVM_VERSION: 10.0.1
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
submodules: recursive
|
|
|
|
|
|
|
|
- name: Install LLVM
|
|
|
|
run: |
|
|
|
|
$TempDir = "$env:RUNNER_WORKSPACE\temp"
|
|
|
|
$Filename = "LLVM-$env:LLVM_VERSION-win64.exe"
|
|
|
|
New-Item -Path "$TempDir" -ItemType Directory -ea 0
|
|
|
|
(New-Object Net.WebClient).DownloadFile("https://axiodl.com/files/$Filename", "$TempDir\$Filename")
|
|
|
|
Start-Process "$TempDir\$Filename" -ArgumentList "/S /D=$env:RUNNER_WORKSPACE\LLVM" -Wait
|
|
|
|
|
|
|
|
- name: Install dependencies
|
|
|
|
run: choco install ninja
|
|
|
|
|
|
|
|
- name: Enable Visual Studio environment
|
|
|
|
uses: ilammy/msvc-dev-cmd@v1
|
|
|
|
|
|
|
|
- name: Configure CMake
|
|
|
|
run: |
|
|
|
|
$workspace = $env:RUNNER_WORKSPACE -replace '\\', '/'
|
2021-04-12 23:42:31 +00:00
|
|
|
cmake -B build . -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo `
|
2021-04-12 20:12:36 +00:00
|
|
|
-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded `
|
2021-04-12 23:42:31 +00:00
|
|
|
-DLLVM_ROOT_DIR="$workspace/LLVM"
|
2021-04-12 20:12:36 +00:00
|
|
|
|
|
|
|
- name: Build
|
2021-04-12 23:39:36 +00:00
|
|
|
run: cmake --build build --target package --verbose
|
2021-04-12 20:12:36 +00:00
|
|
|
|
|
|
|
- name: Test
|
|
|
|
working-directory: build
|
|
|
|
run: ./atdna-test.exe
|
|
|
|
|
|
|
|
- name: Upload artifacts
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
2021-04-13 00:03:17 +00:00
|
|
|
name: athena-win32-amd64
|
2021-04-12 20:12:36 +00:00
|
|
|
path: |
|
2021-04-13 00:03:17 +00:00
|
|
|
build/athena-*.7z
|
|
|
|
|
|
|
|
release:
|
|
|
|
name: Release
|
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
if:
|
|
|
|
contains('
|
|
|
|
refs/heads/master
|
|
|
|
refs/heads/test
|
|
|
|
', github.ref)
|
|
|
|
needs:
|
|
|
|
- build-linux-x86_64
|
|
|
|
- build-linux-aarch64
|
|
|
|
- build-macos-universal
|
|
|
|
- build-win32-amd64
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Download artifacts
|
|
|
|
uses: actions/download-artifact@v2
|
|
|
|
with:
|
|
|
|
path: artifacts
|
|
|
|
|
|
|
|
- name: Create release
|
|
|
|
uses: marvinpinto/action-automatic-releases@latest
|
|
|
|
with:
|
|
|
|
repo_token: ${{github.token}}
|
|
|
|
automatic_release_tag: latest
|
|
|
|
prerelease: true
|
|
|
|
title: Development build
|
|
|
|
files: |
|
|
|
|
artifacts/*
|