Skip to content

Commit fe7b673

Browse files
committed
Split build out into multiple files
1 parent cd15370 commit fe7b673

File tree

3 files changed

+63
-19
lines changed

3 files changed

+63
-19
lines changed

.github/workflows/build-linux.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Build
2+
on: [push, pull_request]
3+
env:
4+
DOTNET_CLI_TELEMETRY_OPTOUT: 1
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Checkout
10+
uses: actions/checkout@v1
11+
with:
12+
fetch-depth: 0
13+
- name: Setup .NET Core
14+
uses: actions/setup-dotnet@v1
15+
with:
16+
dotnet-version: 3.1.401
17+
- name: Build Reason
18+
run: "echo ref: ${{github.ref}} event: ${{github.event_name}}"
19+
- name: Build Version
20+
shell: bash
21+
run: |
22+
dotnet tool install --global minver-cli --version 2.3.1
23+
version=$(minver --tag-prefix v)
24+
echo "::set-env name=MINVERVERSIONOVERRIDE::$version"
25+
- name: Build
26+
run: dotnet build --configuration Release Exceptionless.Net.NonWindows.sln
27+
- name: Run Tests
28+
run: dotnet test --configuration Release --no-build Exceptionless.Net.NonWindows.sln

.github/workflows/build-osx.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Build
2+
on: [push, pull_request]
3+
env:
4+
DOTNET_CLI_TELEMETRY_OPTOUT: 1
5+
jobs:
6+
build:
7+
runs-on: macOS-latest
8+
steps:
9+
- name: Checkout
10+
uses: actions/checkout@v1
11+
with:
12+
fetch-depth: 0
13+
- name: Setup .NET Core
14+
uses: actions/setup-dotnet@v1
15+
with:
16+
dotnet-version: 3.1.401
17+
- name: Build Reason
18+
run: "echo ref: ${{github.ref}} event: ${{github.event_name}}"
19+
- name: Build Version
20+
shell: bash
21+
run: |
22+
dotnet tool install --global minver-cli --version 2.3.1
23+
version=$(minver --tag-prefix v)
24+
echo "::set-env name=MINVERVERSIONOVERRIDE::$version"
25+
- name: Build
26+
run: dotnet build --configuration Release Exceptionless.Net.NonWindows.sln
27+
- name: Run Tests
28+
run: dotnet test --configuration Release --no-build Exceptionless.Net.NonWindows.sln

.github/workflows/build.yml renamed to .github/workflows/build-windows.yml

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,7 @@ env:
44
DOTNET_CLI_TELEMETRY_OPTOUT: 1
55
jobs:
66
build:
7-
runs-on: ${{matrix.os}}
8-
strategy:
9-
fail-fast: false
10-
matrix:
11-
os: [ubuntu-latest, windows-latest, macOS-latest]
7+
runs-on: windows-latest
128
steps:
139
- name: Checkout
1410
uses: actions/checkout@v1
@@ -26,27 +22,19 @@ jobs:
2622
dotnet tool install --global minver-cli --version 2.3.1
2723
version=$(minver --tag-prefix v)
2824
echo "::set-env name=MINVERVERSIONOVERRIDE::$version"
29-
- name: Build Windows
30-
if: matrix.os == 'windows-latest'
25+
- name: Build
3126
run: dotnet build --configuration Release Exceptionless.Net.Windows.sln
32-
- name: Build Non-Windows
33-
if: matrix.os != 'windows-latest'
34-
run: dotnet build --configuration Release Exceptionless.Net.NonWindows.sln
35-
- name: Run Tests Windows
36-
if: matrix.os == 'windows-latest'
27+
- name: Run Tests
3728
run: dotnet test --configuration Release --no-build Exceptionless.Net.Windows.sln
38-
- name: Run Tests Non-Windows
39-
if: matrix.os != 'windows-latest'
40-
run: dotnet test --configuration Release --no-build Exceptionless.Net.NonWindows.sln
4129
- name: Package
42-
if: github.event_name != 'pull_request' && matrix.os == 'windows-latest'
30+
if: github.event_name != 'pull_request'
4331
run: dotnet pack --configuration Release --no-build Exceptionless.Net.Windows.sln
4432
- name: Install GitHub Package Tool
45-
if: github.event_name != 'pull_request' && matrix.os == 'windows-latest'
33+
if: github.event_name != 'pull_request'
4634
run: dotnet tool install gpr -g
4735
- name: Publish CI Packages
4836
shell: bash
49-
if: github.event_name != 'pull_request' && matrix.os == 'windows-latest'
37+
if: github.event_name != 'pull_request'
5038
run: |
5139
for package in $(find -name "*.nupkg" | grep "minver" -v); do
5240
echo "${0##*/}": Pushing $package...
@@ -59,7 +47,7 @@ jobs:
5947
done
6048
- name: Publish Release Packages
6149
shell: bash
62-
if: startsWith(github.ref, 'refs/tags/v') && matrix.os == 'windows-latest'
50+
if: startsWith(github.ref, 'refs/tags/v')
6351
run: |
6452
for package in $(find -name "*.nupkg" | grep "minver" -v); do
6553
echo "${0##*/}": Pushing $package...

0 commit comments

Comments
 (0)