-
Notifications
You must be signed in to change notification settings - Fork 3
95 lines (77 loc) · 2.79 KB
/
checkBuild.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
name: Check Build
on:
workflow_dispatch:
push:
branches: [ develop ]
paths-ignore:
- '**.md'
pull_request:
branches: [ develop ]
paths-ignore:
- '**.md'
jobs:
build_base:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x
- name: Build - Dotnet Build Release
run: dotnet build --configuration Release
working-directory: src
#Build and prepare build tool
- name: Publish build tool - ADB
working-directory: src/ADB
run: dotnet publish -c Release
- name: Self test build tool - ADB
working-directory: src/ADB/bin/Release/net8.0/publish
run: ./ADB --version
- name: Pack ADB - ADB
working-directory: src/ADB/bin/Release/net8.0/publish
run: zip -r ADB.zip . -x \*.pdb
- name: Upload ADB - Upload Artifact
uses: actions/upload-artifact@v4
with:
name: ADB
path: src/ADB/bin/Release/net8.0/publish/ADB.zip
build_variant:
name: Variant
runs-on: ubuntu-latest
needs: [build_base]
strategy:
matrix:
os: [win-x64, linux-x64, linux-arm64]
configuration: [Release]
project: [Aves]
steps:
- uses: actions/checkout@v4
- name: Download ADB - Download Artifact
uses: actions/download-artifact@v4
with:
name: ADB
path: temp_artf/ADB
- name: Unzip ADB
run: unzip temp_artf/ADB/ADB.zip -d build
- name: Setup .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x
- name: Publish ${{ matrix.os }} ${{ matrix.configuration }} - dotnet publish
working-directory: src/${{ matrix.project }}
run: dotnet publish -c ${{ matrix.configuration }} -r ${{ matrix.os }} /p:PublishSingleFile=true
- name: Download dependencies of ${{ matrix.os }} - ADB
working-directory: build
run: ./ADB -c config.json --rid ${{ matrix.os }} --bc ${{ matrix.configuration }}
timeout-minutes: 3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Pack ${{ matrix.os }} - Zip
working-directory: src/${{ matrix.project }}/bin/${{ matrix.configuration }}/net8.0/${{ matrix.os }}/publish/
run: zip -r ${{ matrix.project }}.zip . -x \*.pdb
- name: Upload ${{ matrix.project }}-${{ matrix.os }}
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.project }}-${{ matrix.os }}
path: ./src/${{ matrix.project }}/bin/${{ matrix.configuration }}/net8.0/${{ matrix.os }}/publish/${{ matrix.project }}.zip