Skip to content

Doc: update README.md (#17) #70

Doc: update README.md (#17)

Doc: update README.md (#17) #70

Workflow file for this run

name: Linux Build
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
release:
types:
- published
jobs:
formatting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Format files
run: find include src test -type f -not -name "doctest.h" -a \( -name "*.cc" -o -name "*.h" \) -print0 | xargs -0 clang-format -i
- name: Check for differences
run: |
git status --porcelain
git status --porcelain | xargs -I {} -0 test -z \"{}\"
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
config:
- target: amd64
toolchain: x86_64-multilib-linux-musl
- target: x86
toolchain: x86_64-multilib-linux-musl
- target: arm
toolchain: arm-unknown-linux-musleabihf
emulator: qemu-arm-static
- target: arm64
toolchain: aarch64-unknown-linux-musl
emulator: qemu-aarch64-static
env:
DEBIAN_FRONTEND: noninteractive
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Install Build Dependencies
run: sudo apt-get install -y --no-install-recommends ninja-build qemu-user-static
- name: Install Toolchain
if: matrix.config.toolchain
run: |
wget https://github.com/motis-project/musl-toolchains/releases/latest/download/${{ matrix.config.toolchain }}.tar.xz
tar xf ${{ matrix.config.toolchain }}.tar.xz -C /opt
- name: CMake
run: |
cmake \
-S . -B build \
-G Ninja \
-DCMAKE_TOOLCHAIN_FILE=/opt/${{ matrix.config.toolchain }}/toolchain-${{ matrix.config.target }}.cmake \
-DCMAKE_BUILD_TYPE=Release
- name: Build
run: cmake --build build --target pkg pkg-test
- name: Run Tests
run: ${{ matrix.config.emulator }} ./build/pkg-test
# ==== DISTRIBUTION ====
- name: Upload Distribution
uses: actions/upload-artifact@v2
with:
name: pkg-linux-${{ matrix.config.target }}
path: ./build/pkg
- name: Upload Distribution (Legacy Naming)
uses: actions/upload-artifact@v2
with:
name: pkg
path: ./build/pkg
# ==== RELEASE ====
- name: Upload Release
if: github.event.action == 'published'
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./build/pkg
asset_name: pkg-linux-${{ matrix.config.target }}
asset_content_type: application/x-tar
- name: Upload Release (Legacy Naming)
if: github.event.action == 'published' && matrix.config.target == 'amd64'
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./build/pkg
asset_name: pkg
asset_content_type: application/x-tar