Skip to content

Commit d91ec7f

Browse files
committed
Using Github Actions for CI #654
1 parent a94e9dc commit d91ec7f

File tree

4 files changed

+175
-165
lines changed

4 files changed

+175
-165
lines changed

.github/bors.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
block_labels = ["I-needs-decision", "S-blocked"]
2+
delete_merged_branches = true
3+
status = ["ci"]

.github/workflows/ci.yml

Lines changed: 172 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,172 @@
1+
name: CI
2+
3+
env:
4+
RUST_BACKTRACE: 1
5+
GODOT_VER: 3.2
6+
GODOT_REL: stable
7+
8+
on:
9+
push:
10+
branches:
11+
- staging
12+
- trying
13+
14+
defaults:
15+
run:
16+
shell: bash
17+
18+
jobs:
19+
clippy:
20+
runs-on: ubuntu-latest
21+
continue-on-error: ${{ matrix.experimental }}
22+
strategy:
23+
matrix:
24+
include:
25+
- rust: stable
26+
experimental: false
27+
- rust: nightly
28+
experimental: true
29+
steps:
30+
- uses: actions/checkout@v2
31+
- uses: actions-rs/toolchain@b2417cde72dcf67f306c0ae8e0828a81bf0b189f
32+
with:
33+
profile: minimal
34+
toolchain: ${{ matrix.rust }}
35+
components: clippy
36+
- run: cargo clippy --all --all-features -- -D clippy::style -D clippy::complexity -D clippy::perf -D clippy::dbg_macro -D clippy::todo -D clippy::unimplemented;
37+
38+
rustfmt:
39+
runs-on: ubuntu-latest
40+
steps:
41+
- uses: actions/checkout@v2
42+
- uses: actions-rs/toolchain@b2417cde72dcf67f306c0ae8e0828a81bf0b189f
43+
with:
44+
profile: minimal
45+
toolchain: stable
46+
components: rustfmt
47+
- name: Checking rustfmt
48+
run: cargo fmt --all -- --check;
49+
50+
test:
51+
continue-on-error: ${{ matrix.experimental }}
52+
strategy:
53+
matrix:
54+
include:
55+
- rust: stable
56+
os: ubuntu-latest
57+
experimental: false
58+
- rust: nightly
59+
os: ubuntu-latest
60+
experimental: true
61+
- rust: stable
62+
os: windows-latest
63+
experimental: false
64+
- rust: nightly
65+
os: windows-latest
66+
experimental: true
67+
runs-on: ${{ matrix.os }}
68+
steps:
69+
- uses: actions/checkout@v2
70+
- uses: actions-rs/toolchain@b2417cde72dcf67f306c0ae8e0828a81bf0b189f
71+
with:
72+
profile: minimal
73+
toolchain: stable
74+
- uses: KyleMayes/install-llvm-action@01144dc97b1e2693196c3056414a44f15180648b
75+
with:
76+
version: 10.0
77+
directory: ${{ runner.temp }}/llvm
78+
- run: cargo test --all --all-features;
79+
# cargo test --target x86_64-pc-windows-msvc --all --all-features;
80+
81+
build_release:
82+
continue-on-error: ${{ matrix.experimental }}
83+
strategy:
84+
matrix:
85+
include:
86+
- rust: stable
87+
os: ubuntu-latest
88+
experimental: false
89+
- rust: nightly
90+
os: ubuntu-latest
91+
experimental: true
92+
- rust: stable
93+
os: windows-latest
94+
experimental: false
95+
- rust: nightly
96+
os: windows-latest
97+
experimental: true
98+
runs-on: ${{ matrix.os }}
99+
steps:
100+
- uses: actions/checkout@v2
101+
- uses: actions-rs/toolchain@b2417cde72dcf67f306c0ae8e0828a81bf0b189f
102+
with:
103+
profile: minimal
104+
toolchain: stable
105+
- uses: KyleMayes/install-llvm-action@01144dc97b1e2693196c3056414a44f15180648b
106+
with:
107+
version: 10.0
108+
directory: ${{ runner.temp }}/llvm
109+
- run: cargo build --release;
110+
# cargo build --target x86_64-pc-windows-msvc --release;
111+
112+
godot_test:
113+
continue-on-error: ${{ matrix.experimental }}
114+
strategy:
115+
matrix:
116+
include:
117+
- rust: stable
118+
os: ubuntu-latest
119+
experimental: false
120+
- rust: nightly
121+
os: ubuntu-latest
122+
experimental: true
123+
runs-on: ${{ matrix.os }}
124+
steps:
125+
- uses: actions/checkout@v2
126+
- uses: actions-rs/toolchain@b2417cde72dcf67f306c0ae8e0828a81bf0b189f
127+
with:
128+
profile: minimal
129+
toolchain: stable
130+
- uses: KyleMayes/install-llvm-action@01144dc97b1e2693196c3056414a44f15180648b
131+
with:
132+
version: 10.0
133+
directory: ${{ runner.temp }}/llvm
134+
- name: Installing Godot
135+
run: |
136+
wget "https://downloads.tuxfamily.org/godotengine/$GODOT_VER/Godot_v${GODOT_VER}-${GODOT_REL}_linux_headless.64.zip" -O /tmp/godot.zip
137+
unzip /tmp/godot.zip -d ${{ runner.temp }}/godot_bin
138+
- name: Building Godot-Rust
139+
run: |
140+
cd test;
141+
cargo build;
142+
- name: Running Godot Tests
143+
run: |
144+
mkdir -p ./project/lib;
145+
cp ../target/debug/libgdnative_test.so ./project/lib/;
146+
"${{ runner.temp }}/godot_bin/Godot_v${GODOT_VER}-${GODOT_REL}_linux_headless.64" --path ./project/;
147+
"${{ runner.temp }}/godot_bin/Godot_v${GODOT_VER}-${GODOT_REL}_linux_headless.64" -e --path ./project/ --run-editor-tests;
148+
cargo build --features=type_tag_fallback;
149+
mkdir -p ./project/lib;
150+
cp ../target/debug/libgdnative_test.so ./project/lib/;
151+
"${{ runner.temp }}/godot_bin/Godot_v${GODOT_VER}-${GODOT_REL}_linux_headless.64" --path ./project/;
152+
"${{ runner.temp }}/godot_bin/Godot_v${GODOT_VER}-${GODOT_REL}_linux_headless.64" -e --path ./project/ --run-editor-tests;
153+
154+
# This job doesn't actually test anything, but they're used to tell bors the
155+
# build completed, as there is no practical way to detect when a workflow is
156+
# successful listening to webhooks only.
157+
#
158+
# ALL THE PREVIOUS JOBS NEEDS TO BE ADDED TO THE `needs` SECTION OF THIS JOB!
159+
160+
ci-success:
161+
name: ci
162+
if: github.event_name == 'push' && success()
163+
needs:
164+
- clippy
165+
- rustfmt
166+
- test
167+
- build_release
168+
- godot_test
169+
runs-on: ubuntu-latest
170+
steps:
171+
- name: Mark the job as a success
172+
run: exit 0

.travis.yml

Lines changed: 0 additions & 162 deletions
This file was deleted.

bors.toml

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)