blob: 6d0daa3df03338d9ddd0a25f664f1eb089a58d87 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
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 }}
|