Skip to content

Commit

Permalink
Use generated build matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
bldrvnlw authored Jul 17, 2024
1 parent 89dda19 commit 42a0d70
Showing 1 changed file with 14 additions and 64 deletions.
78 changes: 14 additions & 64 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,70 +2,35 @@ name: t-SNE-Analysis

on:
push:
branches:
- master
- main
- release/*

pull_request:
workflow_dispatch:
inputs:
forceMacBuild:
description: 'If set true override the ENABLE_MACOS_BUILD to force a build'
type: boolean
default: false

env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
MACENABLED: ${{ inputs.forceMacBuild }}

# for matrix check https://docs.github.com/en/actions/reference/specifications-for-github-hosted-runners
jobs:
prepare_matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.matrix_setup.outputs.matrix }}
steps:
- name: Get matrix from file
id: matrix_setup
uses: ManiVaultStudio/github-actions/matrix_setup@main

cross-platform-build:
name: Cross platform build
needs: prepare_matrix
# The CMake configure and build commands are platform agnostic and should work equally
# well on Windows or Mac. You can convert this to a matrix build if you need
# cross-platform coverage.
# See: https://docs.github.com/en/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- name: Windows-msvc2019
os: windows-2019
compiler: msvc-2019
build-cversion: 16
build-runtime: MD
build-config: Release

- name: Linux_gcc11
os: ubuntu-22.04
build-cc: gcc
build-cxx: g++
build-compiler: gcc
build-cversion: 11
build-config: Release
build-os: Linux
build-libcxx: libstdc++

- name: Macos_xcode13.4
os: macos-12
build-compiler: apple-clang
build-cversion: 13
build-config: Release
build-os: Macos
build-xcode-version: 13.4
build-libcxx: libc++

- name: Macos_xcode14.3
os: macos-13
build-compiler: apple-clang
build-cversion: 14
build-config: Release
build-os: Macos
build-xcode-version: 14.3
build-libcxx: libc++
include: ${{ fromJson(needs.prepare_matrix.outputs.matrix) }}

steps:
- name: Checkout the source
Expand All @@ -91,7 +56,7 @@ jobs:
- name: Setup python version
uses: actions/setup-python@v1
with:
python-version: "3.10"
python-version: "3.11"

- name: Start ssh key agent
uses: webfactory/ssh-agent@v0.7.0
Expand All @@ -116,23 +81,8 @@ jobs:
conan-pem: ${{secrets.LKEB_UPLOAD_CERT_CHAIN}}
rs_ssh_key: ${{ secrets.RULESSUPPORT_DEPLOY_KEY }}

- name: Linux build
if: startsWith(matrix.os, 'ubuntu')
uses: ManiVaultStudio/github-actions/conan_linuxmac_build@main
with:
conan-compiler: ${{matrix.build-compiler}}
conan-compiler-version: ${{matrix.build-cversion}}
conan-libcxx-version: ${{matrix.build-libcxx}}
conan-build-type: ${{matrix.build-config}}
conan-build-os: ${{matrix.build-os}}
conan-user: ${{secrets.LKEB_UPLOAD_USER}}
conan-password: ${{secrets.LKEB_UPLOAD_USER_PASSWORD}}
conan-pem: ${{secrets.LKEB_UPLOAD_CERT_CHAIN}}
conan-cc: gcc-${{matrix.build-cversion}}
conan-cxx: g++-${{matrix.build-cversion}}

- name: Mac build
if: startsWith(matrix.os, 'macos') && (env.MACENABLED == 'true' || vars.ENABLE_MACOS_BUILD == 'True')
- name: Linux Mac build
if: "!startsWith(runner.os, 'Windows')"
uses: ManiVaultStudio/github-actions/conan_linuxmac_build@main
with:
conan-compiler: ${{matrix.build-compiler}}
Expand Down

0 comments on commit 42a0d70

Please sign in to comment.