-
Notifications
You must be signed in to change notification settings - Fork 23
83 lines (72 loc) · 2.3 KB
/
main-build.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
name: GitHub action build
on: push
jobs:
main-build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest, buildjet-4vcpu-ubuntu-2204-arm]
env:
TEST_COVERAGE: ${{ matrix.os == 'ubuntu-latest' }}
NO_NET48: ${{ matrix.os == 'buildjet-4vcpu-ubuntu-2204-arm' }}
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_NOLOGO: true
steps:
- name: GIT checkout
uses: actions/checkout@v4
- name: Setup .NET 8
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Run build script
working-directory: scripts
shell: bash
run: |
if [ "$TEST_COVERAGE" == "true" ]
then
./dotnet_build.sh test_coverage
elif [ "$NO_NET48" == "true" ]
then
./dotnet_build.sh no_net48
else
./dotnet_build.sh
fi
- name: Run benchmarks
working-directory: release
shell: bash
run: dotnet ../benchmarks/Fastenshtein.Benchmarking/bin/Release/net8.0/Fastenshtein.Benchmarking.dll
- name: Upload benchmarks results
uses: actions/upload-artifact@v4
with:
name: benchmarks-results-${{ matrix.os }}
path: release/BenchmarkDotNet.Artifacts
if-no-files-found: error
- name: Upload test coverage to Coveralls
if: env.TEST_COVERAGE == 'true'
uses: coverallsapp/github-action@v2
with:
format: lcov
files: release/coverage.net8.info release/coverage.net48.info
- name: Upload dotnet info
uses: actions/upload-artifact@v4
if: env.TEST_COVERAGE == 'true'
with:
name: Built with
path: release/dotnet_info.txt
if-no-files-found: error
- name: Upload test coverage
uses: actions/upload-artifact@v4
if: env.TEST_COVERAGE == 'true'
with:
name: test coverage
path: release/coverage.*.info
if-no-files-found: error
- name: Upload NuGet packages
uses: actions/upload-artifact@v4
if: env.TEST_COVERAGE == 'true'
with:
name: NuGet packages
path: release/Fastenshtein.*upkg
if-no-files-found: error