File tree Expand file tree Collapse file tree 2 files changed +31
-3
lines changed Expand file tree Collapse file tree 2 files changed +31
-3
lines changed Original file line number Diff line number Diff line change @@ -34,13 +34,15 @@ jobs:
34
34
- target : Linux
35
35
# Build using older Linux version to preserve sdk compatibility with old GLIBC
36
36
# See discussion in https://github.com/getsentry/sentry-unity/issues/1730 for more details
37
- host : ubuntu-20.04
37
+ container : ubuntu:20.04
38
+ host : ubuntu-latest
38
39
- target : Windows
39
40
host : windows-latest
40
41
uses : ./.github/workflows/sdk.yml
41
42
with :
42
43
target : ${{ matrix.target }}
43
44
runsOn : ${{ matrix.host }}
45
+ container : ${{ matrix.container }}
44
46
45
47
build-unity-sdk :
46
48
name : Build Unity SDK
Original file line number Diff line number Diff line change 7
7
target :
8
8
required : true
9
9
type : string
10
+ container :
11
+ required : false
12
+ type : string
13
+ default : ' '
10
14
11
15
env :
12
16
DOTNET_CLI_TELEMETRY_OPTOUT : 1
15
19
jobs :
16
20
build :
17
21
runs-on : ${{ inputs.runsOn }}
22
+ container : ${{ inputs.container }}
18
23
timeout-minutes : 30
19
24
steps :
25
+ - name : Set up Git in container
26
+ if : ${{ inputs.container != '' }}
27
+ # ubuntu:20.04 does not have git installed by default. Make it available
28
+ # for actions/checkout to get a proper clone instead of downloading a
29
+ # tarball using the GitHub REST API. This ensures that git submodule
30
+ # commands work as expected.
31
+ #
32
+ # Furthermore, add an exception for the workspace directory to avoid the
33
+ # following git error (runner host vs. container):
34
+ # fatal: detected dubious ownership in repository at '/__w/sentry-unity/sentry-unity'
35
+ run : |
36
+ apt-get update
37
+ apt-get install -y git
38
+ git config --global --add safe.directory $GITHUB_WORKSPACE
39
+ env :
40
+ DEBIAN_FRONTEND : noninteractive
41
+
20
42
- uses : actions/checkout@v3
21
43
22
44
- name : Select submodules
52
74
- name : Installing Linux Dependencies
53
75
if : ${{ inputs.target == 'Linux' && steps.cache.outputs.cache-hit != 'true' }}
54
76
run : |
55
- sudo apt-get update
56
- sudo apt-get install zlib1g-dev libcurl4-openssl-dev libssl-dev
77
+ apt-get update
78
+ apt-get install -y zlib1g-dev libcurl4-openssl-dev libssl-dev build-essential cmake curl
79
+ curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin --channel 9.0 --install-dir /usr/share/dotnet
80
+ echo "/usr/share/dotnet" >> $GITHUB_PATH
81
+ env :
82
+ DEBIAN_FRONTEND : noninteractive
57
83
58
84
- name : Build
59
85
if : steps.cache.outputs.cache-hit != 'true'
You can’t perform that action at this time.
0 commit comments