-
Notifications
You must be signed in to change notification settings - Fork 72
115 lines (108 loc) · 3.15 KB
/
cross-ci.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
name: Cross CI
on:
pull_request:
paths-ignore:
- "**/*.md"
push:
branches:
- main
paths-ignore:
- "**/*.md"
merge_group:
types: [checks_requested]
defaults:
run:
shell: bash
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
cross-check:
name: Cross checking ${{ matrix.job.target }}
runs-on: ${{ matrix.job.os }}
strategy:
fail-fast: false
matrix:
rust: [stable]
feature: [release]
job:
- os: windows-latest
os-name: windows
target: x86_64-pc-windows-msvc
architecture: x86_64
use-cross: false
# FIXME: `aws-lc-sys` doesn't cross compile
# - os: windows-latest
# os-name: windows
# target: x86_64-pc-windows-gnu
# architecture: x86_64
# use-cross: false
- os: macos-13
os-name: macos
target: x86_64-apple-darwin
architecture: x86_64
use-cross: false
- os: macos-latest
os-name: macos
target: aarch64-apple-darwin
architecture: arm64
use-cross: true
- os: ubuntu-latest
os-name: linux
target: x86_64-unknown-linux-gnu
architecture: x86_64
use-cross: false
- os: ubuntu-latest
os-name: linux
target: x86_64-unknown-linux-musl
architecture: x86_64
use-cross: false
- os: ubuntu-latest
os-name: linux
target: aarch64-unknown-linux-gnu
architecture: arm64
use-cross: true
- os: ubuntu-latest
os-name: linux
target: aarch64-unknown-linux-musl
architecture: arm64
use-cross: true
- os: ubuntu-latest
os-name: linux
target: i686-unknown-linux-gnu
architecture: i686
use-cross: true
# FIXME: `aws-lc-sys` doesn't cross compile
# - os: ubuntu-latest
# os-name: netbsd
# target: x86_64-unknown-netbsd
# architecture: x86_64
# use-cross: true
# FIXME: `aws-lc-sys` doesn't cross compile
# - os: ubuntu-latest
# os-name: linux
# target: armv7-unknown-linux-gnueabihf
# architecture: armv7
# use-cross: true
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Run Cross-CI action
uses: rustic-rs/cross-ci-action@main
with:
toolchain: ${{ matrix.rust }}
target: ${{ matrix.job.target }}
use-cross: ${{ matrix.job.use-cross }}
all-features: "false"
feature: ${{ matrix.feature }}
result:
name: Result (Cross-CI)
runs-on: ubuntu-latest
needs: cross-check
steps:
- name: Mark the job as successful
run: exit 0
if: success()
- name: Mark the job as unsuccessful
run: exit 1
if: "!success()"