|
|
|
name: CI
|
|
|
|
|
|
|
|
on:
|
|
|
|
create:
|
|
|
|
tags:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
pull_request:
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
name: Native Build
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
os:
|
|
|
|
- ubuntu-latest
|
|
|
|
- macos-latest
|
|
|
|
- windows-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
with:
|
|
|
|
submodules: true
|
|
|
|
- name: Set up Visual Studio shell
|
|
|
|
uses: egor-tensin/vs-shell@6d88c01ad4b6b33190d261b45e241e462545652b
|
|
|
|
if: matrix.os == 'windows-latest'
|
|
|
|
- name: Install ninja (Windows)
|
|
|
|
run: choco install ninja
|
|
|
|
if: matrix.os == 'windows-latest'
|
|
|
|
- name: Install ninja (macOS)
|
|
|
|
run: brew install ninja
|
|
|
|
if: matrix.os == 'macos-latest'
|
|
|
|
- name: Install ninja (Linux)
|
|
|
|
run: sudo apt install ninja-build
|
|
|
|
if: matrix.os == 'ubuntu-latest'
|
|
|
|
- name: Build
|
|
|
|
run: make package
|
|
|
|
shell: bash
|
|
|
|
- name: Run the testsuite
|
|
|
|
run: make check
|
|
|
|
if: matrix.os == 'ubuntu-latest'
|
|
|
|
- name: Upload artifacts
|
|
|
|
uses: actions/upload-artifact@v1
|
|
|
|
with:
|
|
|
|
# Upload the dist folder. Give it a name according to the OS it was built for.
|
|
|
|
name: ${{ format( 'dist-{0}', matrix.os) }}
|
|
|
|
path: dist
|
|
|
|
|
|
|
|
dockerbuild:
|
|
|
|
name: Docker Build
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
with:
|
|
|
|
submodules: true
|
|
|
|
- name: Run docker_build script
|
|
|
|
run: ./docker_build.sh
|
|
|
|
- name: Upload artifacts
|
|
|
|
uses: actions/upload-artifact@v1
|
|
|
|
with:
|
|
|
|
# Upload the dist folder. Give it a name according to the OS it was built for.
|
|
|
|
name: dist-ubuntu-xenial
|
|
|
|
path: dist
|