-
Notifications
You must be signed in to change notification settings - Fork 113
82 lines (77 loc) · 2.78 KB
/
build-test.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
name: Build, Test & Release
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Setup submodule
run: |
git submodule update --init --recursive
- name: Pull engine updates
uses: space-wizards/[email protected]
- name: Update Engine Submodules
run: |
cd RobustToolbox/
git submodule update --init --recursive
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 8.0.100
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore /m
- name: Content.Tests
shell: pwsh
run: |
$env:COMPlus_gcServer=1
dotnet test --no-build Content.Tests/Content.Tests.csproj -v n
- name: Content.IntegrationTests
shell: pwsh
run: |
$env:COMPlus_gcServer=1
dotnet test --no-build Content.IntegrationTests/Content.IntegrationTests.csproj -v n
- name: Publish OpenDream
if: github.event_name == 'push'
run: dotnet run --project OpenDreamPackageTool --no-build --configuration Release -- --server --hybrid-acz --platform ${{ matrix.os == 'windows-latest' && 'win-x64' || 'linux-x64' }} --output output/
- name: Publish DMCompiler
if: github.event_name == 'push'
run: dotnet publish DMCompiler -c Release -o output/DMCompiler_${{ matrix.os == 'windows-latest' && 'win-x64' || 'linux-x64' }}
- name: Gzip releases
if: github.event_name == 'push'
run: |
tar -czvf output/DMCompiler_${{ matrix.os == 'windows-latest' && 'win-x64' || 'linux-x64' }}.tar.gz -C output DMCompiler_${{ matrix.os == 'windows-latest' && 'win-x64' || 'linux-x64' }}
tar -czvf output/OpenDreamServer_${{ matrix.os == 'windows-latest' && 'win-x64' || 'linux-x64' }}.tar.gz -C output OpenDreamServer_${{ matrix.os == 'windows-latest' && 'win-x64' || 'linux-x64' }}
- name: Upload artifact
if: github.event_name == 'push'
uses: actions/upload-artifact@v3
with:
name: build-${{ matrix.os }}
path: output/*.tar.gz
retention-days: 1
release:
needs: build
runs-on: ubuntu-latest
if: github.event_name == 'push'
steps:
- name: Download artifacts
uses: actions/download-artifact@v3
with:
path: artifacts
- name: Publish latest release
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
prerelease: true
title: "Development Build"
files: |
artifacts/*/*.tar.gz