forked from georust/proj
-
Notifications
You must be signed in to change notification settings - Fork 0
122 lines (119 loc) · 3.87 KB
/
test.yml
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
on: push
name: proj ci
jobs:
# The `ci-result` job doesn't actually test anything - it just aggregates the
# overall build status for bors, otherwise our bors.toml would need an entry
# for each individual job produced by the job-matrix.
#
# Ref: https://github.com/rust-lang/crater/blob/9ab6f9697c901c4a44025cf0a39b73ad5b37d198/.github/workflows/bors.yml#L125-L149
#
# ALL THE SUBSEQUENT JOBS NEED THEIR `name` ADDED TO THE `needs` SECTION OF THIS JOB!
ci-result:
name: ci result
runs-on: ubuntu-latest
needs:
- proj-ubuntu
- proj-sys-ubuntu
- proj-macos
- proj-sys-macos
steps:
- name: Mark the job as a success
if: success()
run: exit 0
- name: Mark the job as a failure
if: "!success()"
run: exit 1
proj-ubuntu:
name: proj ubuntu
if: "!contains(github.event.head_commit.message, '[skip ci]')"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
container_image: ["georust/proj-ci:rust-1.52", "georust/proj-ci:rust-1.53"]
features:
- ""
- "--features network"
- "--features bundled_proj"
- "--no-default-features"
- "--features \"network bundled_proj\""
- "--features \"network geo-types\""
- "--features \"bundled_proj geo-types\""
- "--features \"network bundled_proj geo-types\""
container:
image: ${{ matrix.container_image }}
steps:
- name: Checkout repository
uses: actions/checkout@v2
- run: cargo build ${{ matrix.features }}
- run: cargo test ${{ matrix.features }}
proj-macos:
name: proj macos
if: "!contains(github.event.head_commit.message, '[skip ci]')"
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
features: ["", "--features network"]
steps:
- name: Checkout repository
uses: actions/checkout@v2
- run: cargo build ${{ matrix.features }}
- run: cargo test ${{ matrix.features }}
proj-sys-ubuntu:
name: proj-sys ubuntu
if: "!contains(github.event.head_commit.message, '[skip ci]')"
runs-on: ubuntu-latest
defaults:
run:
working-directory: proj-sys
container: ${{ matrix.container }}
strategy:
matrix:
include:
- container:
image: georust/proj-ci:rust-1.53
env:
_PROJ_SYS_TEST_EXPECT_BUILD_FROM_SRC: 0
features: ""
- container:
image: georust/proj-ci:rust-1.52
env:
_PROJ_SYS_TEST_EXPECT_BUILD_FROM_SRC: 0
features: ""
- container:
image: georust/proj-ci:rust-1.53
env:
_PROJ_SYS_TEST_EXPECT_BUILD_FROM_SRC: 1
features: "--features bundled_proj"
- container:
image: georust/proj-ci:rust-1.52
env:
_PROJ_SYS_TEST_EXPECT_BUILD_FROM_SRC: 1
features: "--features bundled_proj"
- container:
image: georust/proj-ci-without-system-proj:rust-1.53
env:
_PROJ_SYS_TEST_EXPECT_BUILD_FROM_SRC: 1
features: ""
- container:
image: georust/proj-ci-without-system-proj:rust-1.52
env:
_PROJ_SYS_TEST_EXPECT_BUILD_FROM_SRC: 1
features: ""
steps:
- name: Checkout repository
uses: actions/checkout@v2
- run: cargo build ${{ matrix.features }}
- run: cargo test ${{ matrix.features }}
proj-sys-macos:
name: proj-sys macos
if: "!contains(github.event.head_commit.message, '[skip ci]')"
runs-on: macos-latest
env:
_PROJ_SYS_TEST_EXPECT_BUILD_FROM_SRC: 0
steps:
- name: Checkout repository
uses: actions/checkout@v2
- run: brew install proj
- run: cargo test ${{ matrix.features }}