-
Notifications
You must be signed in to change notification settings - Fork 0
91 lines (76 loc) · 2.44 KB
/
Copy pathpr.yml
File metadata and controls
91 lines (76 loc) · 2.44 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
name: PR Build
on:
pull_request:
paths-ignore:
- '**/*.md'
- '.gitignore'
- 'LICENSE*'
env:
LANG: en_US.UTF-8
LC_ALL: en_US.UTF-8
PYTHONIOENCODING: utf8
permissions:
contents: read
concurrency:
group: ci-pr-${{ github.actor }}-${{ github.head_ref || github.run_number }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: 🐧 PR Build (${{ matrix.platform }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
platform: [linux, web]
defaults:
run:
shell: zsh {0}
steps:
- name: Checkout
uses: actions/checkout@v7
with:
submodules: recursive
- name: clone Godot Cpp repository
uses: GuillaumeFalourd/clone-github-repo-action@19817562c346ff60f9935158dede6c5ece8fd0ac # v2.3
with:
depth: 1
branch: master
owner: 'godotengine'
repository: 'godot-cpp'
- name: Setup Rust (Stable)
uses: dtolnay/rust-toolchain@4cda84d5c5c54efe2404f9d843567869ab1699d4 # stable
- name: Setup Rust Cache
uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
with:
workspaces: "ss_player/SpriteStudio-SDK"
- name: Install Nightly Rust (Web only)
if: matrix.platform == 'web'
run: |
rustup target add wasm32-unknown-unknown
rustup toolchain install nightly
rustup target add wasm32-unknown-unknown --toolchain nightly
rustup component add rust-src --toolchain nightly
- name: Build Runtime (SDK)
run: ./scripts/build-runtime.sh platform=${{ matrix.platform }} build=debug
- name: Setup SCons Cache
uses: actions/cache@v3
with:
path: ~/.scons_cache
key: ${{ runner.os }}-${{ matrix.platform }}-scons-${{ github.sha }}
restore-keys: |
${{ runner.os }}-${{ matrix.platform }}-scons-
- name: setup for gdextension
uses: ./.github/actions/setup-extension
with:
platform: ${{ matrix.platform }}
os: ubuntu-latest
- name: Build
env:
SCONS_CACHE: ~/.scons_cache
run: |
mkdir -p ~/.scons_cache
if [ "${{ matrix.platform }}" = "linux" ]; then
./scripts/release-gdextension-linux.sh
elif [ "${{ matrix.platform }}" = "web" ]; then
./scripts/release-gdextension-web.sh
fi