26
26
27
27
env :
28
28
GDEXT_FEATURES : ' godot-core/convenience'
29
+ GDEXT_CRATE_ARGS : ' -p godot-codegen -p godot-ffi -p godot-core -p godot-macros -p godot'
29
30
30
31
defaults :
31
32
run :
@@ -37,51 +38,86 @@ defaults:
37
38
# cancel-in-progress: true
38
39
39
40
jobs :
40
- # rustfmt:
41
- # runs-on: ubuntu-latest
42
- # steps:
43
- # - uses: actions/checkout@v3
44
- # - name: "Install Rust"
45
- # uses: ./.github/composite/rust
46
- # with:
47
- # rust: stable
48
- # components: rustfmt
49
- # - name: "Check rustfmt"
50
- # run: cargo fmt --all -- --check
51
-
52
- # unit-test:
53
- # runs-on: ubuntu-latest
54
- # steps:
55
- # - uses: actions/checkout@v3
56
- # - name: "Install Rust"
57
- # uses: ./.github/composite/rust
58
- #
59
- # # TODO seems unneeded in GDNative...?
60
- # - name: "Install LLVM"
61
- # uses: ./.github/composite/llvm
62
- #
63
- # - name: "Compile tests"
64
- # run: cargo test --workspace --features ${GDEXT_FEATURES} --no-run
65
- #
66
- # - name: "Test"
67
- # run: cargo test --workspace --features ${GDEXT_FEATURES}
41
+ rustfmt :
42
+ runs-on : ubuntu-20.04
43
+ steps :
44
+ - uses : actions/checkout@v3
45
+ - name : " Install Rust"
46
+ uses : ./.github/composite/rust
47
+ with :
48
+ rust : stable
49
+ components : rustfmt
50
+ - name : " Check rustfmt"
51
+ run : cargo fmt --all -- --check
52
+
53
+ unit-test :
54
+ name : test (${{ matrix.name }})
55
+ runs-on : ${{ matrix.os }}
56
+ continue-on-error : false
57
+ strategy :
58
+ fail-fast : false # cancel all jobs as soon as one fails?
59
+ matrix :
60
+ # Order this way because macOS typically has the longest duration, followed by Windows, so it benefits total workflow execution time.
61
+ # Additionally, the 'linux (msrv *)' special case will then be listed next to the other 'linux' jobs.
62
+ # Note: Windows uses '--target x86_64-pc-windows-msvc' by default as Cargo argument.
63
+ include :
64
+ - name : macos
65
+ os : macos-11
66
+ rust-toolchain : stable
67
+
68
+ - name : windows
69
+ os : windows-latest
70
+ rust-toolchain : stable-x86_64-pc-windows-msvc
71
+
72
+ # Don't use latest Ubuntu (22.04) as it breaks lots of ecosystem compatibility.
73
+ # If ever moving to ubuntu-latest, need to manually install libtinfo5 for LLVM.
74
+ - name : linux
75
+ os : ubuntu-20.04
76
+ rust-toolchain : stable
77
+
78
+ steps :
79
+ - uses : actions/checkout@v3
80
+
81
+ - name : " Install Rust"
82
+ uses : ./.github/composite/rust
83
+
84
+ - name : " Install minimal dependency versions from Cargo"
85
+ run : cargo +nightly update -Z minimal-versions
86
+ if : ${{ matrix.rust.special == 'minimal-deps' }}
87
+
88
+ - name : " Install Rust"
89
+ uses : ./.github/composite/rust
90
+ with :
91
+ rust : stable
92
+ cache-key : ${{ matrix.rust.special }} # 'minimal-deps' or empty/not defined
93
+
94
+ - name : " Install LLVM"
95
+ uses : ./.github/composite/llvm
96
+ if : matrix.name == 'macos'
97
+
98
+ - name : " Compile tests"
99
+ run : cargo test $GDEXT_CRATE_ARGS --features unit-test,$GDEXT_FEATURES --no-run
100
+
101
+ - name : " Test"
102
+ run : cargo test $GDEXT_CRATE_ARGS --features unit-test,$GDEXT_FEATURES ${{ matrix.testflags }}
103
+
68
104
69
105
integration-test-godot :
70
- name : itest-godot-${{ matrix.name }}
71
- timeout-minutes : 15
106
+ name : itest-godot (${{ matrix.name }})
72
107
runs-on : ${{ matrix.os }}
73
108
continue-on-error : false
109
+ timeout-minutes : 24
74
110
strategy :
75
111
fail-fast : false # cancel all jobs as soon as one fails?
76
112
matrix :
77
113
# Order this way because macOS typically has the longest duration, followed by Windows, so it benefits total workflow execution time.
78
114
# Additionally, the 'linux (msrv *)' special case will then be listed next to the other 'linux' jobs.
79
115
# Note: Windows uses '--target x86_64-pc-windows-msvc' by default as Cargo argument.
80
116
include :
81
- # - name: macos
82
- # os: macos-12
83
- # rust-toolchain: stable
84
- # godot-binary: godot.macos.editor.dev.x86_64
117
+ - name : macos
118
+ os : macos-12
119
+ rust-toolchain : stable
120
+ godot-binary : godot.macos.editor.dev.x86_64
85
121
86
122
- name : windows
87
123
os : windows-latest
@@ -106,7 +142,7 @@ jobs:
106
142
# godot_ver: ${{ matrix.godot }}
107
143
108
144
license-guard :
109
- runs-on : ubuntu-latest
145
+ runs-on : ubuntu-20.04
110
146
if : github.ref != 'refs/heads/master'
111
147
steps :
112
148
- uses : actions/checkout@v3
0 commit comments