diff options
Diffstat (limited to '.github/workflows/build-test.yml')
-rw-r--r-- | .github/workflows/build-test.yml | 106 |
1 files changed, 53 insertions, 53 deletions
diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 6d0daa3..f4f81c5 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -1,53 +1,53 @@ -name: Build test - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - workflow_dispatch: - -jobs: - build: - strategy: - matrix: - host: [windows-latest, ubuntu-latest, macos-latest] - os: [win, linux, osx] - arch: [x86, x64, arm] - sc: [no-self-contained, self-contained] - exclude: - - os: linux - arch: x86 - - os: osx - arch: x86 - - os: osx - arch: arm - runs-on: ${{ matrix.host }} - env: - APP_NAME: nestiler - PROJECT_PATH: ./NesTiler - OUTPUT_DIR: output - CONFIGURATION: Release - OUTPUT_SUBDIR: ${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.sc }} - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Checkout submodules - run: git submodule update --init --recursive - - name: Setup .NET - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 6.0.x - - name: Build - env: - SC_OPS: ${{ matrix.sc == 'self-contained' && '--self-contained true -p:PublishTrimmed=True' || '--no-self-contained' }} - run: dotnet publish ${{ env.PROJECT_PATH }} -c ${{ env.CONFIGURATION }} -r ${{ matrix.os }}-${{ matrix.arch }} -p:PublishSingleFile=true ${{ env.SC_OPS }} -o ${{ env.OUTPUT_DIR }}/${{ env.OUTPUT_SUBDIR }}/${{ env.APP_NAME }} -p:IncludeAllContentForSelfExtract=true - - name: Upload artifact - if: | - (matrix.host == 'ubuntu-latest' && matrix.os == 'linux') - || (matrix.host == 'macos-latest' && matrix.os == 'osx') - || (matrix.host == 'windows-latest' && matrix.os == 'win') - uses: actions/upload-artifact@v2 - with: - name: ${{ env.OUTPUT_SUBDIR }} - path: ${{ env.OUTPUT_DIR }}/${{ env.OUTPUT_SUBDIR }} +name: Build test
+
+on:
+ push:
+ branches: [ master ]
+ pull_request:
+ branches: [ master ]
+ workflow_dispatch:
+
+jobs:
+ build:
+ strategy:
+ matrix:
+ host: [windows-latest, ubuntu-latest, macos-latest]
+ os: [win, linux, osx]
+ arch: [x86, x64, arm]
+ sc: [no-self-contained, self-contained]
+ exclude:
+ - os: linux
+ arch: x86
+ - os: osx
+ arch: x86
+ - os: osx
+ arch: arm
+ runs-on: ${{ matrix.host }}
+ env:
+ APP_NAME: nestiler
+ PROJECT_PATH: ./NesTiler
+ OUTPUT_DIR: output
+ CONFIGURATION: Release
+ OUTPUT_SUBDIR: ${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.sc }}
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+ - name: Checkout submodules
+ run: git submodule update --init --recursive
+ - name: Setup .NET
+ uses: actions/setup-dotnet@v1
+ with:
+ dotnet-version: 6.0.x
+ - name: Build
+ env:
+ SC_OPS: ${{ matrix.sc == 'self-contained' && '--self-contained true -p:PublishTrimmed=True' || '--no-self-contained' }}
+ run: dotnet publish ${{ env.PROJECT_PATH }} -c ${{ env.CONFIGURATION }} -r ${{ matrix.os }}-${{ matrix.arch }} -p:PublishSingleFile=true ${{ env.SC_OPS }} -o ${{ env.OUTPUT_DIR }}/${{ env.OUTPUT_SUBDIR }}/${{ env.APP_NAME }} -p:IncludeAllContentForSelfExtract=true
+ - name: Upload artifact
+ if: |
+ (matrix.host == 'ubuntu-latest' && matrix.os == 'linux')
+ || (matrix.host == 'macos-latest' && matrix.os == 'osx')
+ || (matrix.host == 'windows-latest' && matrix.os == 'win')
+ uses: actions/upload-artifact@v2
+ with:
+ name: ${{ env.OUTPUT_SUBDIR }}
+ path: ${{ env.OUTPUT_DIR }}/${{ env.OUTPUT_SUBDIR }}
|