From 4f4a0f87782df878ff09bc04e9d38bd03b310d08 Mon Sep 17 00:00:00 2001 From: "Erik A. Brandstadmoen" Date: Tue, 27 Feb 2024 06:56:34 +0100 Subject: [PATCH] Trying matrixes --- .github/workflows/build.yml | 40 +++++++++++++++++++++++-------------- 1 file changed, 25 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 95d10bca..abae7eb1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -319,34 +319,44 @@ jobs: strategy: matrix: - os: [windows-latest, ubuntu-latest, macos-latest] - category: [ "CommandLine.SqlServer", "CommandLine.PostgreSQL", - "CommandLine.MariaDB", "CommandLine.Sqlite", "CommandLine.Oracle" ] - include: + #os: [windows-latest, ubuntu-latest, macos-latest] + # category: [ "CommandLine.SqlServer", "CommandLine.PostgreSQL", + # "CommandLine.MariaDB", "CommandLine.Sqlite", "CommandLine.Oracle" ] + category: + - CommandLine.SqlServer + - CommandLine.PostgreSQL + - CommandLine.MariaDB + - CommandLine.Sqlite + - CommandLine.Oracle + #include: + os: # - os: windows-latest # executable: grate.exe - - os: windows-latest + - name: windows-latest arch: win-x64 + executable: grate.exe # - os: linux-latest # executable: grate - - os: linux-latest + - name: linux-latest arch: linux-x64 + executable: grate # - os: macos-latest # executable: grate - - os: macos-latest + - name: macos-latest arch: osx-x64 + executable: grate #arch: [ "linux", "win", "macos" ] # arch: [ "win-x64", "win-x86", "win-arm64", # "linux-musl-x64", "linux-musl-arm64", "linux-x64", "linux-arm64", # "osx-x64", "osx-arm64" # ] - runs-on: ${{ matrix.os }} + runs-on: ${{ matrix.os.name }} steps: - uses: actions/checkout@v4 - uses: actions/download-artifact@v3 with: - name: grate-${{ matrix.arch }}-self-contained-${{ needs.set-version-number.outputs.nuGetVersion }} + name: grate-${{ matrix.os.arch }}-self-contained-${{ needs.set-version-number.outputs.nuGetVersion }} #name: grate-linux-musl-x64-self-contained-${{ needs.set-version-number.outputs.nuGetVersion }} path: executables/${{ matrix.arch }} - name: Setup .NET 8 @@ -356,19 +366,19 @@ jobs: - name: chmod u+x run: chmod u+x $GrateExecutablePath - if: ${{ matrix.arch != 'win-x64' }} + if: ${{ matrix.os.arch != 'win-x64' }} env: - #GrateExecutablePath: ${{ github.workspace }}/executables/${{ matrix.arch }}/${{ matrix.executable }} - GrateExecutablePath: ${{ github.workspace }}/executables/${{ matrix.arch }}/grate + GrateExecutablePath: ${{ github.workspace }}/executables/${{ matrix.os.arch }}/${{ matrix.os.executable }} + #GrateExecutablePath: ${{ github.workspace }}/executables/${{ matrix.arch }}/grate - name: Test run: | dotnet test \ unittests/CommandLine/${{ matrix.category }} \ - --logger:"xunit;LogFilePath=/tmp/test-results/${{ matrix.arch }}/${{ matrix.category }}.xml" -- \ + --logger:"xunit;LogFilePath=/tmp/test-results/${{ matrix.os.arch }}/${{ matrix.category }}.xml" -- \ -MaxCpuCount 2 env: LogLevel: Warning - #GrateExecutablePath: ${{ github.workspace }}/executables/${{ matrix.arch }}/${{ matrix.executable }} - GrateExecutablePath: ${{ github.workspace }}/executables/${{ matrix.arch }}/grate + GrateExecutablePath: ${{ github.workspace }}/executables/${{ matrix.os.arch }}/${{ matrix.os.executable }} + #GrateExecutablePath: ${{ github.workspace }}/executables/${{ matrix.arch }}/grate TZ: UTC