Skip to content

Commit af79d1a

Browse files
committed
wip: Switch to GH actions.
1 parent fb66881 commit af79d1a

File tree

8 files changed

+269
-257
lines changed

8 files changed

+269
-257
lines changed

.github/workflows/bindgen.yml

Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
name: bindgen
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
11+
jobs:
12+
rustfmt:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v2
17+
18+
- name: Install stable
19+
uses: actions-rs/toolchain@v1
20+
with:
21+
profile: minimal
22+
# TODO: Should ideally be stable, but we use some nightly-only
23+
# features.
24+
toolchain: nightly
25+
override: true
26+
components: rustfmt
27+
28+
- name: Run rustfmt
29+
uses: actions-rs/cargo@v1
30+
with:
31+
command: fmt
32+
args: -- --check
33+
34+
msrv:
35+
runs-on: ubuntu-latest
36+
steps:
37+
- uses: actions/checkout@v2
38+
39+
- name: Install msrv
40+
uses: actions-rs/toolchain@v1
41+
with:
42+
profile: minimal
43+
# MSRV below is documented in README.md, please update that if you
44+
# change this.
45+
toolchain: 1.40.0
46+
override: true
47+
48+
- name: Build with msrv
49+
run: rm Cargo.lock && cargo +1.40.0 build --lib
50+
51+
quickchecking:
52+
runs-on: ubuntu-latest
53+
steps:
54+
- uses: actions/checkout@v2
55+
56+
- name: Install stable
57+
uses: actions-rs/toolchain@v1
58+
with:
59+
profile: minimal
60+
toolchain: stable
61+
override: true
62+
63+
# TODO: Actually run quickchecks once `bindgen` is reliable enough.
64+
- name: Build quickcheck tests
65+
run: cd tests/quickchecking && cargo test
66+
67+
test-expectations:
68+
runs-on: ubuntu-latest
69+
steps:
70+
- uses: actions/checkout@v2
71+
72+
- name: Install stable
73+
uses: actions-rs/toolchain@v1
74+
with:
75+
profile: minimal
76+
toolchain: stable
77+
override: true
78+
79+
- name: Test expectations
80+
run: cd tests/expectations && cargo test
81+
82+
test:
83+
runs-on: ${{matrix.os}}
84+
strategy:
85+
matrix:
86+
os: [ubuntu-latest]
87+
llvm_version: ["3.9", "4.0", "5.0", "9.0"]
88+
release_build: [0, 1]
89+
no_default_features: [0, 1]
90+
# FIXME: There are no pre-built static libclang libraries, so the
91+
# `static` feature is not testable atm.
92+
feature_runtime: [0, 1]
93+
feature_extra_asserts: [0]
94+
95+
exclude:
96+
# 3.9 and 4.0 are too old to support regular dynamic linking, so this
97+
# is not expected to work.
98+
- os: ubuntu-latest
99+
llvm_version: "3.9"
100+
no_default_features: 1
101+
feature_runtime: 0
102+
103+
- os: ubuntu-latest
104+
llvm_version: "4.0"
105+
no_default_features: 1
106+
feature_runtime: 0
107+
108+
include:
109+
# Test with extra asserts just with latest llvm versions to prevent
110+
# explosion
111+
- os: ubuntu-latest
112+
llvm_version: "9.0"
113+
release_build: 0
114+
no_default_features: 0
115+
feature_extra_asserts: 1
116+
117+
# Ensure stuff works on macos too
118+
- os: macos-latest
119+
llvm_version: "9.0"
120+
release_build: 0
121+
no_default_features: 0
122+
feature_extra_asserts: 0
123+
steps:
124+
- uses: actions/checkout@v2
125+
126+
- name: Install stable
127+
uses: actions-rs/toolchain@v1
128+
with:
129+
profile: minimal
130+
toolchain: stable
131+
override: true
132+
133+
- name: Run all the tests
134+
env:
135+
GITHUB_ACTIONS_OS: ${{matrix.os}}
136+
LLVM_VERSION: ${{matrix.llvm_version}}
137+
BINDGEN_RELEASE_BUILD: ${{matrix.release_build}}
138+
BINDGEN_FEATURE_RUNTIME: ${{matrix.feature_runtime}}
139+
BINDGEN_FEATURE_EXTRA_ASSERTS: ${{matrix.feature_extra_asserts}}
140+
BINDGEN_NO_DEFAULT_FEATURES: ${{matrix.no_default_features}}
141+
run: ./ci/test.sh

.travis.yml

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

ci/assert-rustfmt.sh

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

ci/assert-warnings.sh

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

ci/before_install.sh

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

0 commit comments

Comments
 (0)