Skip to content

Commit

Permalink
fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
fpelliccioni committed Sep 9, 2024
1 parent 8c667c0 commit 02048e3
Showing 1 changed file with 29 additions and 8 deletions.
37 changes: 29 additions & 8 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,41 @@
name: .NET

# on:
# push:
# branches: [ master ]
# pull_request:
# branches: [ master ]

on: [push, pull_request]

jobs:
build:

generate-matrix:
# needs: execute-linter
name: Generate Job Matrix
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- name: Generate Job Matrix
id: set-matrix
env:
MATRIX: '{"config": [
{"name": "Linux x86_64 GCC 14","compiler": "GCC","version": "14","os": "ubuntu-20.04","docker_suffix": "-ubuntu20.04", "os_kind": "linux"},
{"name": "macOS - arm64 - apple-clang 15","compiler": "apple-clang","version": "15","os": "macos-14", "os_kind": "macos"}
]}'

run: |
echo "${MATRIX}"
echo "matrix=${MATRIX}" >> $GITHUB_OUTPUT
builds:
needs: generate-matrix
runs-on: ${{ matrix.config.os }}
# runs-on: windows-2022
# runs-on: windows-latest
# runs-on: windows-2019
# runs-on: ubuntu-latest
runs-on: ubuntu-22.04
# runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix: ${{fromJson(needs.generate-matrix.outputs.matrix)}}
name: ${{ matrix.config.name }}


steps:
Expand Down Expand Up @@ -82,6 +102,7 @@ jobs:
shell: bash

- name: Push
if: ${{ matrix.config.os_kind == 'linux' }}
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
GHA_COMMIT_MSG: ${{ github.event.head_commit.message }}
Expand Down

0 comments on commit 02048e3

Please sign in to comment.