-
Notifications
You must be signed in to change notification settings - Fork 3
73 lines (51 loc) · 1.73 KB
/
build-public.yaml
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: Build the SIL Kit FMU Importer (.NET 6) (public profile)
# Define the triggers for this workflow
on:
push:
jobs:
build-windows:
runs-on: windows-latest
steps:
# Check out this Git repo
- uses: actions/checkout@v3
- uses: actions/setup-dotnet@v3
with:
dotnet-version: '6.0.x'
- name: Build & Publish
run: dotnet build ./FmuImporter/BuildAll/Build.csproj -v:m
- name: Build Tests
run: dotnet build ./FmuImporter/BuildAll/BuildTests.csproj -v:m
- name: Run Tests
run: dotnet test ./FmuImporter/_build/crossplatform-x64-Release/FmuImporter.Tests.dll
# Get environment variable for docker image URI and provide it to next build step
prep-linux:
runs-on: [Ubuntu-20.04]
outputs:
image: ${{ steps.set_image.outputs.image }}
environment: build-action
steps:
- id: set_image
env:
DOCKER_IMAGE_URI: ${{ vars.DOCKER_IMAGE_URI }}
run: echo "image=${{vars.DOCKER_IMAGE_URI}}" >> "$GITHUB_OUTPUT"
# Build the project, then remove the built artifacts
build-linux:
runs-on: [Ubuntu-20.04]
needs: prep-linux
container:
image: ${{ needs.prep-linux.outputs.image }}
steps:
- run: ls -l
- run: pwd
- run: "echo ImageURI=${{needs.prep-linux.outputs.image}}"
# Check out this Git repo
- uses: actions/checkout@v3
- uses: actions/setup-dotnet@v3
with:
dotnet-version: '6.0.x'
- name: Build & Publish
run: dotnet build ./FmuImporter/BuildAll/Build.csproj -v:m
- name: Build Tests
run: dotnet build ./FmuImporter/BuildAll/BuildTests.csproj -v:m
- name: Run Tests
run: dotnet test ./FmuImporter/_build/crossplatform-x64-Release/FmuImporter.Tests.dll