forked from stride3d/stride
-
Notifications
You must be signed in to change notification settings - Fork 0
93 lines (88 loc) · 3.59 KB
/
test-linux.yml
File metadata and controls
93 lines (88 loc) · 3.59 KB
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
name: Test Linux
on:
workflow_dispatch:
inputs:
build-type:
description: Build Configuration
default: Release
type: choice
options:
- Debug
- Release
test-category:
description: Category of tests
default: Simple
type: choice
options:
- Simple
- Game
workflow_call:
inputs:
build-type:
default: Release
type: string
test-category:
default: Simple
type: string
concurrency:
group: test-linux-${{ github.event.pull_request.number || github.ref }}-${{ github.event.inputs.build-type || inputs.build-type || 'Debug' }}-${{ github.event.inputs.test-category || inputs.test-category || 'Simple' }}
cancel-in-progress: true
jobs:
#
# Test Stride on Linux
#
Linux-Tests:
if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' || github.event.pull_request.draft == false }}
name: Test (${{ github.event.inputs.build-type || inputs.build-type }}, ${{ github.event.inputs.test-category || inputs.test-category || 'Simple' }})
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
lfs: true
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'
- name: Install Build Dependencies
run: |
sudo apt-get update
sudo apt-get install -y libbsd-dev clang llvm lld
- name: Patch NativePath for Linux
run: |
# Make strlcat_chk and strlcpy_chk non-fatal on Linux
sed -i 's/#if !__has_builtin(__builtin___strlcat_chk)/#if !__has_builtin(__builtin___strlcat_chk) \&\& !defined(__linux__)/' deps/NativePath/NativePath.h
sed -i 's/#if !__has_builtin(__builtin___strlcpy_chk)/#if !__has_builtin(__builtin___strlcpy_chk) \&\& !defined(__linux__)/' deps/NativePath/NativePath.h
# This step isn't needed, it adds another NuGet soruce
# - name: Configure NuGet Sources
# run: |
# # Get absolute path to local packages
# LOCAL_PACKAGES_PATH="$(pwd)/bin/packages"
# # Only add the local source (not the non-existent global one)
# dotnet nuget add source "$LOCAL_PACKAGES_PATH" --name "StrideDev Local"
# # List configured sources
# echo "==== Configured NuGet Sources ===="
# dotnet nuget list source
- name: Build
run: |
dotnet build build/Stride.Tests.${{ github.event.inputs.test-category || inputs.test-category || 'Simple' }}.slnf \
-restore -m:1 -nr:false \
-v:m -p:WarningLevel=0 \
-p:Configuration=${{ github.event.inputs.build-type || inputs.build-type }} \
-p:StridePlatforms=Linux \
-p:StrideGraphicsApis=OpenGL \
# This step isn't needed, it lists the NuGet sources again
# - name: Inspect NuGet Local Sources (always)
# if: always()
# run: |
# echo "==== NuGet Sources (dotnet) ===="
# dotnet nuget list source || true
# echo
# echo "==== Working Directory ===="
# pwd
# echo
# echo "==== StrideDev Local ./bin/packages ===="
# if [ -d ./bin/packages ]; then find ./bin/packages -maxdepth 2 -type f -printf '%P\n' | head -200; else echo "Directory not found"; fi
- name: Test
run: |
dotnet test build/Stride.Tests.${{ github.event.inputs.test-category || inputs.test-category || 'Simple' }}.slnf \
--no-build \
-p:Configuration=${{ github.event.inputs.build-type || inputs.build-type }}