Skip to content

Commit 7d9814d

Browse files
authored
ci: use self-hosted runners (#546)
1 parent bcc2c6c commit 7d9814d

File tree

6 files changed

+48
-37
lines changed

6 files changed

+48
-37
lines changed

.github/workflows/ci.yaml

+33-31
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,23 @@ jobs:
1515
runs-on: ubuntu-latest
1616
needs:
1717
- test-linux
18-
# - test-linux-aarch64
18+
- test-linux-aarch64
1919
- test-macos
2020
- test-windows
2121
- lint
22+
- docs-check
23+
- test-cli
2224
steps:
2325
- run: exit 0
2426

2527
lint:
26-
runs-on: [self-hosted, X64]
28+
runs-on: [self-hosted, Linux, amd64]
2729

2830
strategy:
2931
matrix:
3032
rust: [nightly]
3133
steps:
32-
- uses: actions/checkout@v3
34+
- uses: actions/checkout@v4
3335
- uses: dtolnay/rust-toolchain@master
3436
with:
3537
components: rustfmt,clippy
@@ -42,13 +44,13 @@ jobs:
4244
cargo fmt -- --check
4345
4446
docs-check:
45-
runs-on: [self-hosted, X64]
47+
runs-on: [self-hosted, Linux, amd64]
4648

4749
strategy:
4850
matrix:
4951
rust: [nightly]
5052
steps:
51-
- uses: actions/checkout@v3
53+
- uses: actions/checkout@v4
5254
- uses: dtolnay/rust-toolchain@master
5355
with:
5456
components: rustfmt,clippy
@@ -62,79 +64,79 @@ jobs:
6264
cargo rustdoc -p volo-thrift --all-features -- --deny warnings
6365
6466
test-linux:
65-
runs-on: [self-hosted, X64]
67+
runs-on: [self-hosted, Linux, amd64]
6668

6769
strategy:
6870
matrix:
6971
rust: [nightly, stable]
7072
steps:
71-
- uses: actions/checkout@v3
73+
- uses: actions/checkout@v4
7274
- uses: dtolnay/rust-toolchain@master
7375
with:
7476
components: rustfmt,clippy
7577
toolchain: ${{matrix.rust}}
7678
- name: Run tests
7779
run: |
80+
bash scripts/install-linux-dependencies.sh
7881
bash scripts/clippy-and-test.sh
7982
80-
# test-linux-aarch64:
81-
# runs-on: [self-hosted, arm]
82-
83-
# strategy:
84-
# matrix:
85-
# rust: [nightly, stable]
86-
# steps:
87-
# - uses: actions/checkout@v3
88-
# - uses: dtolnay/rust-toolchain@master
89-
# with:
90-
# components: rustfmt,clippy
91-
# toolchain: ${{matrix.rust}}
92-
# - name: Run tests
93-
# run: |
94-
# bash scripts/clippy-and-test.sh
83+
test-linux-aarch64:
84+
runs-on: [self-hosted, Linux, aarch64]
85+
86+
strategy:
87+
matrix:
88+
rust: [nightly, stable]
89+
steps:
90+
- uses: actions/checkout@v4
91+
- uses: dtolnay/rust-toolchain@master
92+
with:
93+
components: rustfmt,clippy
94+
toolchain: ${{matrix.rust}}
95+
- name: Run tests
96+
run: |
97+
bash scripts/install-linux-dependencies.sh
98+
bash scripts/clippy-and-test.sh
9599
96100
test-macos:
97-
runs-on: macos-latest
101+
runs-on: [self-hosted, macOS]
98102

99103
strategy:
100104
matrix:
101105
rust: [nightly, stable]
102106
steps:
103-
- uses: actions/checkout@v3
107+
- uses: actions/checkout@v4
104108
- uses: dtolnay/rust-toolchain@master
105109
with:
106110
components: rustfmt,clippy
107111
toolchain: ${{matrix.rust}}
108-
# - uses: Swatinem/rust-cache@v1
109112
- name: Run tests
110113
run: |
111114
bash scripts/clippy-and-test.sh
112115
113116
test-windows:
114-
runs-on: windows-latest
117+
runs-on: [self-hosted, Windows]
115118

116119
strategy:
117120
matrix:
118-
rust: [nightly, stable]
121+
rust: [stable]
119122
steps:
120-
- uses: actions/checkout@v3
123+
- uses: actions/checkout@v4
121124
- uses: dtolnay/rust-toolchain@master
122125
with:
123126
components: rustfmt,clippy
124127
toolchain: ${{matrix.rust}}
125-
# - uses: Swatinem/rust-cache@v1
126128
- name: Run tests
127129
run: |
128130
bash scripts/clippy-and-test.sh
129131
130132
test-cli:
131-
runs-on: [self-hosted, X64]
133+
runs-on: [self-hosted, Linux, amd64]
132134

133135
strategy:
134136
matrix:
135137
rust: [stable]
136138
steps:
137-
- uses: actions/checkout@v3
139+
- uses: actions/checkout@v4
138140
- uses: dtolnay/rust-toolchain@master
139141
with:
140142
components: rustfmt

.github/workflows/dependency-review.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ permissions:
66

77
jobs:
88
dependency-review:
9-
runs-on: [self-hosted, X64]
9+
runs-on: [self-hosted, Linux, amd64]
1010
steps:
1111
- name: 'Checkout Repository'
12-
uses: actions/checkout@v3
12+
uses: actions/checkout@v4
1313
- name: 'Dependency Review'
1414
uses: actions/dependency-review-action@v1

.github/workflows/security.yaml

+3-2
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@ on:
77
- '**/Cargo.lock'
88
jobs:
99
security-audit:
10-
runs-on: ubuntu-latest
10+
runs-on: [self-hosted, Linux, amd64]
1111
steps:
12-
- uses: actions/checkout@v3
12+
- uses: actions/checkout@v4
13+
- uses: dtolnay/rust-toolchain@stable
1314
- uses: actions-rs/audit-check@v1
1415
with:
1516
token: ${{ secrets.GITHUB_TOKEN }}

scripts/clippy-and-test.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ echo_command cargo clippy -p volo -- --deny warnings
3838
echo_command cargo clippy -p volo-build -- --deny warnings
3939
echo_command cargo clippy -p volo-cli -- --deny warnings
4040
echo_command cargo clippy -p volo-macros -- --deny warnings
41-
echo_command cargo clippy -p examples -- --deny warnings
41+
echo_command cargo clippy -p examples -- -A clippy::literal_string_with_formatting_args --deny warnings
4242

4343
# Test
4444
echo_command cargo test -p volo-thrift

scripts/install-linux-dependencies.sh

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
3+
set -o errexit
4+
set -o nounset
5+
set -o pipefail
6+
7+
apt update
8+
apt install -y cmake libssl-dev pkg-config
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# for test dedups
2-
namespace rs common
2+
namespace rs common
33

44
struct CommonReq {
55
}

0 commit comments

Comments
 (0)