enable ci on non-main branches
This commit is contained in:
parent
8471091fbc
commit
f638d790a7
|
@ -0,0 +1,97 @@
|
||||||
|
name: Build working branch
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- '!main'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
|
||||||
|
build-linux:
|
||||||
|
runs-on: ubuntu-18.04
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
platform: [gcc]
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
ref: ${{ github.event.pull_request.head.sha }}
|
||||||
|
- name: Setup Ninja
|
||||||
|
uses: ashutoshvarma/setup-ninja@master
|
||||||
|
with:
|
||||||
|
version: 1.10.2
|
||||||
|
- name: Build
|
||||||
|
env:
|
||||||
|
CC: ${{ steps.vars.outputs.cc }}
|
||||||
|
CXX: ${{ steps.vars.outputs.cxx }}
|
||||||
|
MATRIX_PLATFORM: ${{ matrix.platform }}
|
||||||
|
run: .github/scripts/build-linux.sh
|
||||||
|
- name: Test
|
||||||
|
run: |
|
||||||
|
cd build
|
||||||
|
ctest --verbose
|
||||||
|
- name: Upload artifact
|
||||||
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
|
uses: actions/upload-artifact@v1
|
||||||
|
with:
|
||||||
|
name: artifacts
|
||||||
|
path: linux-amd64.tar.gz
|
||||||
|
|
||||||
|
build-macos:
|
||||||
|
runs-on: macos-10.15
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
ref: ${{ github.event.pull_request.head.sha }}
|
||||||
|
- name: Setup Ninja
|
||||||
|
uses: ashutoshvarma/setup-ninja@master
|
||||||
|
with:
|
||||||
|
version: 1.10.2
|
||||||
|
- name: Build
|
||||||
|
run: |
|
||||||
|
.github/scripts/build-macos.sh
|
||||||
|
- name: Test
|
||||||
|
run: |
|
||||||
|
cd build
|
||||||
|
ctest --verbose
|
||||||
|
- name: Upload artifact
|
||||||
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
|
uses: actions/upload-artifact@v1
|
||||||
|
with:
|
||||||
|
name: artifacts
|
||||||
|
path: darwin-amd64.tar.gz
|
||||||
|
|
||||||
|
build-windows:
|
||||||
|
runs-on: windows-2019
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
platform: [x86, amd64]
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
ref: ${{ github.event.pull_request.head.sha }}
|
||||||
|
- name: Setup Ninja
|
||||||
|
uses: ashutoshvarma/setup-ninja@master
|
||||||
|
with:
|
||||||
|
version: 1.10.2
|
||||||
|
- uses: ilammy/msvc-dev-cmd@v1.4.1
|
||||||
|
with:
|
||||||
|
arch: ${{ matrix.platform }}
|
||||||
|
- name: Build
|
||||||
|
run: |
|
||||||
|
.github/scripts/build-msvc.ps1
|
||||||
|
env:
|
||||||
|
MATRIX_PLATFORM: ${{ matrix.platform }}
|
||||||
|
- name: Test
|
||||||
|
run: |
|
||||||
|
cd build
|
||||||
|
ctest --verbose -C RelWithDebInfo
|
||||||
|
- name: Upload artifact
|
||||||
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
|
uses: actions/upload-artifact@v1
|
||||||
|
with:
|
||||||
|
name: artifacts
|
||||||
|
path: windows-${{ matrix.platform }}.zip
|
Loading…
Reference in New Issue