-
Notifications
You must be signed in to change notification settings - Fork 40
98 lines (85 loc) · 3.38 KB
/
build-bebopc.yml
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
name: build-bebopc
on:
workflow_dispatch:
push:
paths:
- "Compiler/**"
- "Core/**"
branches:
- master
pull_request:
paths:
- "Compiler/**"
- "Core/**"
branches:
- master
jobs:
build-compiler:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, macos-latest, ubuntu-22.04]
include:
- os: macos-latest
IDENTIFIER: osx
ARTIFACT: bebopc
- os: windows-latest
IDENTIFIER: win
ARTIFACT: bebopc.exe
- os: ubuntu-22.04
IDENTIFIER: linux
ARTIFACT: bebopc
env:
CONFIGURATION: Release
BUILD_ARTIFACT_X86_64: ./bin/compiler/Release/publish/${{matrix.IDENTIFIER}}-x64/${{matrix.ARTIFACT}}
BUILD_ARTIFACT_ARM64: ./bin/compiler/Release/publish/${{matrix.IDENTIFIER}}-arm64/${{matrix.ARTIFACT}}
BUILD_ZIP_ARTIFACT_X86_64: ./bin/compiler/Release/publish/${{matrix.ARTIFACT}}-${{matrix.IDENTIFIER}}-x64.zip
BUILD_ZIP_ARTIFACT_ARM64: ./bin/compiler/Release/publish/${{matrix.ARTIFACT}}-${{matrix.IDENTIFIER}}-arm64.zip
steps:
- uses: actions/checkout@v1
- name: Get Enviorment Variables
id: dotenv
uses: falti/[email protected]
- if: matrix.os == 'ubuntu-22.04'
name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install clang zlib1g-dev libkrb5-dev libtinfo5
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: "7.0.x" # SDK Version to use; x will use the latest version of the 7.0 channel
include-prerelease: true
- name: Restore Solution
run: dotnet restore
- name: Build bebopc
run: |
dotnet publish -c ${{env.CONFIGURATION}} -r ${{matrix.IDENTIFIER}}-x64 -p:ReleaseVersion=${{ steps.dotenv.outputs.version }} -p:PublishTrimmed=false -p:PublishSingleFile=true --self-contained
dotnet publish -c ${{env.CONFIGURATION}} -r ${{matrix.IDENTIFIER}}-arm64 -p:ReleaseVersion=${{ steps.dotenv.outputs.version }} -p:PublishTrimmed=false -p:PublishSingleFile=true --self-contained
working-directory: ./Compiler/
- if: matrix.os == 'macos-latest'
name: Zip macOS Binary
run: |
zip -j ${{env.BUILD_ZIP_ARTIFACT_X86_64}} ${{env.BUILD_ARTIFACT_X86_64}}
zip -j ${{env.BUILD_ZIP_ARTIFACT_ARM64}} ${{env.BUILD_ARTIFACT_ARM64}}
- if: matrix.os == 'ubuntu-22.04'
name: ZIP Linux Build
run: |
zip -j ${{env.BUILD_ZIP_ARTIFACT_X86_64}} ${{env.BUILD_ARTIFACT_X86_64}}
zip -j ${{env.BUILD_ZIP_ARTIFACT_ARM64}} ${{env.BUILD_ARTIFACT_ARM64}}
- if: matrix.os == 'windows-latest'
name: ZIP Windows Build
shell: powershell
run: |
Compress-Archive -Path ${{env.BUILD_ARTIFACT_X86_64}} -DestinationPath ${{env.BUILD_ZIP_ARTIFACT_X86_64}}
Compress-Archive -Path ${{env.BUILD_ARTIFACT_ARM64}} -DestinationPath ${{env.BUILD_ZIP_ARTIFACT_ARM64}}
- name: Upload X86_64 Build
uses: actions/upload-artifact@v2
with:
name: ${{matrix.IDENTIFIER}}-x64
path: ${{env.BUILD_ZIP_ARTIFACT_X86_64}}
- name: Upload ARM64 Build
uses: actions/upload-artifact@v2
with:
name: ${{matrix.IDENTIFIER}}-arm64
path: ${{env.BUILD_ZIP_ARTIFACT_ARM64}}