Skip to content

Commit

Permalink
enable ci on non-main branches
Browse files Browse the repository at this point in the history
  • Loading branch information
dethrace-labs committed Sep 16, 2022
1 parent 8471091 commit f638d79
Show file tree
Hide file tree
Showing 2 changed files with 97 additions and 0 deletions.
97 changes: 97 additions & 0 deletions .github/workflows/build-branch.yml
Original file line number Diff line number Diff line change
@@ -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
File renamed without changes.

0 comments on commit f638d79

Please sign in to comment.