Skip to content

Commit

Permalink
Merge pull request #19 from brwarner/actionmatrix
Browse files Browse the repository at this point in the history
Consolidating builds into matrix
  • Loading branch information
brwarner authored Feb 11, 2021
2 parents ed92ae4 + eeab767 commit ca7eec4
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 106 deletions.
42 changes: 30 additions & 12 deletions .github/workflows/linux_builds.yml → .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,27 @@
name: 🏁 Linux Builds
on:
push:
branches: [ master, main ]
name: 🏁 Builds and Tests
on:
push:
branches:
- master
pull_request:

env:
BUILD_TYPE: release

jobs:
linux-compilation:
name: Linux Compilation
runs-on: "ubuntu-20.04"
compilation:
name: Compilation and Unit Tests
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: macos-latest
artifact: macos
- os: windows-latest
artifact: win64
- os: "ubuntu-20.04"
artifact: linux

steps:

# Checkout project
Expand All @@ -19,37 +31,43 @@ jobs:
- name: Create Build Environment
run: cmake -E make_directory ${{github.workspace}}/build

# Run CMake configuration to create build files
- name: Configure CMake
shell: bash
working-directory: ${{github.workspace}}/build
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE

# Build using CMake and OS toolkit
- name: Build
working-directory: ${{github.workspace}}/build
shell: bash
# Execute the build. You can specify a specific target with "--target <NAME>"
run: cmake --build . --config $BUILD_TYPE

- name: Tests
# Run CMake tests (unit tests, etc.)
- name: CTests
working-directory: ${{github.workspace}}/build
shell: bash
run: ctest . -C $BUILD_TYPE -V

# Copy all build artifacts to the bin directory
- name: Install
working-directory: ${{github.workspace}}/build
shell: bash
run: cmake --install . --config $BUILD_TYPE --prefix bin

# Upload bin directory as artifact
- name: Upload Artifacts
uses: actions/upload-artifact@v1
with:
name: linux
name: ${{ matrix.artifact }}
path: build/bin/

linux-ink-proof:
# Run Ink Proof and Generate a GitHub page
ink-proof-pages:
name: Ink Proof Page Generation
runs-on: "ubuntu-latest"
needs: "linux-compilation"
needs: compilation
if: github.ref == 'refs/heads/master'

steps:
# Checkout project with submodules
Expand Down
47 changes: 0 additions & 47 deletions .github/workflows/macos_builds.yml

This file was deleted.

47 changes: 0 additions & 47 deletions .github/workflows/windows_builds.yml

This file was deleted.

0 comments on commit ca7eec4

Please sign in to comment.