Skip to content

Commit a3d1474

Browse files
committed
feat(CI): Add CI:
Github CI files taken from https://github.com/jonhoo/rust-ci-conf Squashed commit of the following: commit 5ea59356dc9379a08dff5bf3df3c5016df2ca7f3 Author: Jon Gjengset <[email protected]> Date: Sun Mar 12 09:40:09 2023 -0700 Remove -Zmiri-tag-raw-pointers as it's now default commit a076ec1cb42e88e6444ae7f573570ec53c149074 Author: Jon Gjengset <[email protected]> Date: Sat Mar 11 15:08:45 2023 -0800 Minimal token permissions See tokio-rs/tokio#5072 commit 9afb0e111adcd678ef06884cf737aa9e0cf135e7 Author: Jon Gjengset <[email protected]> Date: Sat Mar 11 15:07:39 2023 -0800 Get rid of most actions-rs bits Given that that project is unmaintained. actions-rs/toolchain#216 commit 90999e1bd1a9dabaecd149697f69e8e26e810562 Author: Jon Gjengset <[email protected]> Date: Fri Mar 10 21:22:30 2023 -0800 Fix install message for msrv commit 362696ab8007ef1a4779885a398286856cacf555 Author: Jon Gjengset <[email protected]> Date: Fri Mar 10 21:16:35 2023 -0800 Move to maintained rust installer See actions-rs/toolchain#216 commit d6bd5c67a444a379d70a014de537c29dc77f7711 Merge: 82cbed8 c8a7835 Author: Jon Gjengset <[email protected]> Date: Fri Dec 9 19:42:59 2022 -0500 Merge pull request #1 from jonhoo/dependabot/github_actions/codecov/codecov-action-3 Bump codecov/codecov-action from 2 to 3 commit c8a7835b2f0b21d9a64e6a8b0ddc10fbc88e2dd1 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat Dec 10 00:25:41 2022 +0000 Bump codecov/codecov-action from 2 to 3 Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 2 to 3. - [Release notes](https://github.com/codecov/codecov-action/releases) - [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md) - [Commits](codecov/codecov-action@v2...v3) --- updated-dependencies: - dependency-name: codecov/codecov-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> commit 82cbed84f82e8538cdfc99dcf1b8b2cbab4fb126 Author: Jon Gjengset <[email protected]> Date: Fri Dec 9 16:25:21 2022 -0800 Notify if actions themselves are outdated commit cf47d4cad4b241a30245a51aa1ac7e99e7fedf8a Author: Jon Gjengset <[email protected]> Date: Wed Sep 28 18:23:39 2022 -0700 ignore is a list commit b783cb31ab3c6c27ad826bde44aa917c0d0908da Author: Jon Gjengset <[email protected]> Date: Fri Sep 23 08:53:07 2022 -0700 Use dependabot, but only for major versions commit 441dc27e4d1e365bfc9b0c25e736da6cb1d15102 Author: Jon Gjengset <[email protected]> Date: Sun Sep 18 14:01:04 2022 -0700 Allow examples and binaries to require features commit ea198cc4991e2f869cd99cb8175652576ef15119 Author: Jon Gjengset <[email protected]> Date: Sun Sep 18 13:52:47 2022 -0700 More concise name for scheduled jobs commit 15c1fa2ffcc0f31fabcdcd90cde6a05b54baf8b5 Author: Jon Gjengset <[email protected]> Date: Sun Sep 18 12:10:58 2022 -0700 Catch upcoming deprecations commit 56d4398a24f8c7aae0ba4a74eefaf75d1c3db3a8 Author: Jon Gjengset <[email protected]> Date: Sun Sep 18 11:52:12 2022 -0700 Merge safety workflows commit 71c2048cc0017a84a294be69d3b1629f55b1c8f0 Author: Jon Gjengset <[email protected]> Date: Sun Sep 18 11:44:55 2022 -0700 mv github .github This should make it possible to have rust-ci-conf as a remote you merge from. commit afa25312c9c6cf8748629bd3a5c054a688785dfc Author: Jon Gjengset <[email protected]> Date: Sun Sep 18 11:29:34 2022 -0700 Practice what you preach commit 4859c128823805015dc164d58316dc5b25a69264 Author: Jon Gjengset <[email protected]> Date: Sat Sep 17 18:16:21 2022 -0700 Add TODOs from twitter thread commit 87365663b1f49c88c2a3642fece0b2a932001355 Author: Jon Gjengset <[email protected]> Date: Sat Sep 17 16:19:55 2022 -0700 Missed a submodule checkout commit 99ddee84ab05f5d5f37ad30a31d18dd7c72050c9 Author: Jon Gjengset <[email protected]> Date: Sat Sep 17 12:47:57 2022 -0700 Standardize on 'main' as branch name commit 0f90a0b77958b3978b6be3997a09ea5cb9b1bd6b Author: Jon Gjengset <[email protected]> Date: Sat Sep 17 12:47:38 2022 -0700 Make everything use checkout@v3 commit 2de2235ad3803a978e150fca8d38182eb6ed7a9e Author: Jon Gjengset <[email protected]> Date: Sat Sep 17 12:46:13 2022 -0700 Merge another test workflow commit 971c3fd9eb5f7d80088caaf5647a74b82d40b860 Author: Jon Gjengset <[email protected]> Date: Sat Sep 17 12:42:52 2022 -0700 Merge another test workflow commit 0910d977fc68082220d493bef07bc9d5f2265fc7 Author: Jon Gjengset <[email protected]> Date: Sat Sep 17 12:42:25 2022 -0700 Merge another test workflow commit 8953a88abecc66ea7811766b46aff6a5fd767124 Author: Jon Gjengset <[email protected]> Date: Sat Sep 17 12:42:10 2022 -0700 Add first test workflow commit 3bd8b12ec08910b2609cdfc843474d5b83ff7dbc Author: Jon Gjengset <[email protected]> Date: Sat Sep 17 12:41:57 2022 -0700 Merge another style workflow commit fe460400ed2259af7e17f5ff51742137623e9e8e Author: Jon Gjengset <[email protected]> Date: Sat Sep 17 12:41:00 2022 -0700 Merge another style workflow commit bc3f55118617b5ffe1ea479c4f6d7d2167b86d36 Author: Jon Gjengset <[email protected]> Date: Sat Sep 17 12:40:29 2022 -0700 Add first style workflow commit 05dd4680bf90603c70cb7cd406299675441fe59d Author: Jon Gjengset <[email protected]> Date: Sat Sep 17 12:39:59 2022 -0700 Merge another os-check workflow commit 92379c862376607f7caca04e470c09671922f238 Author: Jon Gjengset <[email protected]> Date: Sat Sep 17 12:39:09 2022 -0700 Add first os-check workflow commit c74ee968a1aafec9e839dee907f0137e6356feff Author: Jon Gjengset <[email protected]> Date: Sat Sep 17 12:38:56 2022 -0700 Add (only) no-std workflow commit e6ef8e3166b93c22af938872a547e104f2601587 Author: Jon Gjengset <[email protected]> Date: Sat Sep 17 12:38:01 2022 -0700 Merge another msrv workflow commit 1113c895d862ce860c82596cac973ad075ef1ac6 Author: Jon Gjengset <[email protected]> Date: Sat Sep 17 12:37:31 2022 -0700 Merge another msrv workflow commit b60aa5589ac569446a5128453983dee9bb504666 Author: Jon Gjengset <[email protected]> Date: Sat Sep 17 12:37:03 2022 -0700 Merge another msrv workflow commit 9b48ae326374d8d8609a65649026fa09f8a68c7f Author: Jon Gjengset <[email protected]> Date: Sat Sep 17 12:36:43 2022 -0700 Add first msrv workflow commit 77079d77cb4aa288bda667917667cfaee87bd361 Author: Jon Gjengset <[email protected]> Date: Sat Sep 17 12:36:29 2022 -0700 Add (only) miri workflow commit c65a7c4f87be9ddea9e34eb254f3b6d5933db4ef Author: Jon Gjengset <[email protected]> Date: Sat Sep 17 12:35:09 2022 -0700 Add first minial workflow commit bf66d94f15b7288f417cfae0eab6542e2e100daf Author: Jon Gjengset <[email protected]> Date: Sat Sep 17 12:34:43 2022 -0700 Add (only) LSAN workflow commit f67cad0f915deebcdf7ceb89ffdd0925bc910153 Author: Jon Gjengset <[email protected]> Date: Sat Sep 17 12:34:34 2022 -0700 Add (only) loom workflow commit d8c8a99dea99b437eefc56e5b873a863a4446c51 Author: Jon Gjengset <[email protected]> Date: Sat Sep 17 12:33:48 2022 -0700 Merge another features workflow commit 043eb24611b5272a04082d63566837a9efbc71e9 Author: Jon Gjengset <[email protected]> Date: Sat Sep 17 12:32:58 2022 -0700 Merge another features workflow commit 922692a2977a4c93786a0ecbe11fc01501361aad Author: Jon Gjengset <[email protected]> Date: Sat Sep 17 12:32:32 2022 -0700 Merge another features workflow commit 225ad3978688c093f4670ec04352d465076f39d3 Author: Jon Gjengset <[email protected]> Date: Sat Sep 17 12:31:58 2022 -0700 Add first features workflow commit 1fe2a6d008275efaff56200b8fba5ecc252aa970 Author: Jon Gjengset <[email protected]> Date: Sat Sep 17 12:31:17 2022 -0700 Merge another coverage.yml commit fe6ba380bd39c665e9d9a2153b2dc5287fe25cae Author: Jon Gjengset <[email protected]> Date: Sat Sep 17 12:29:55 2022 -0700 Merge another coverage.yml commit bbdbd96ec709e3cc83a081cf821fdfffce85ecb5 Author: Jon Gjengset <[email protected]> Date: Sat Sep 17 12:27:38 2022 -0700 Add first coverage workflow commit 11027d3f75ced20536b99225edccf34f286dd4e0 Author: Jon Gjengset <[email protected]> Date: Sat Sep 17 12:27:27 2022 -0700 Add (only) ASAN workflow commit 126c9a3a35d5ac428c22883d36f0aac69d2e20e9 Author: Jon Gjengset <[email protected]> Date: Sat Sep 17 12:25:23 2022 -0700 Place codecov config under .github commit b32648cabb5862b0814ab0abd6d5c81498758270 Author: Jon Gjengset <[email protected]> Date: Sat Sep 17 12:24:02 2022 -0700 Merge another codecov commit 510b69615dd47cb63584976512cb95b265cb22bf Author: Jon Gjengset <[email protected]> Date: Sat Sep 17 12:23:03 2022 -0700 Merge another codecov commit 7f34f791c0a5c3f2c2ce2ed7e43ff12ed123c62c Author: Jon Gjengset <[email protected]> Date: Sat Sep 17 12:22:18 2022 -0700 Merge another codecov commit 1b8c3056e6a015949896ca20815719930ec48051 Author: Jon Gjengset <[email protected]> Date: Sat Sep 17 12:21:57 2022 -0700 Merge another codecov commit 1c486b2c73cb2ae896dd77e0f0ec060a47f15cd7 Author: Jon Gjengset <[email protected]> Date: Sat Sep 17 12:10:07 2022 -0700 Add one codecov
1 parent 67c0535 commit a3d1474

File tree

5 files changed

+252
-0
lines changed

5 files changed

+252
-0
lines changed

.github/codecov.yml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# ref: https://docs.codecov.com/docs/codecovyml-reference
2+
coverage:
3+
# Hold ourselves to a high bar
4+
range: 85..100
5+
round: down
6+
precision: 1
7+
status:
8+
# ref: https://docs.codecov.com/docs/commit-status
9+
project:
10+
default:
11+
# Avoid false negatives
12+
threshold: 1%
13+
14+
# Test files aren't important for coverage
15+
ignore:
16+
- "tests"
17+
18+
# Make comments less noisy
19+
comment:
20+
layout: "files"
21+
require_changes: yes

.github/dependabot.yml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: github-actions
4+
directory: /
5+
schedule:
6+
interval: daily
7+
- package-ecosystem: cargo
8+
directory: /
9+
schedule:
10+
interval: daily

.github/workflows/check.yml

+88
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
permissions:
2+
contents: read
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
name: check
8+
jobs:
9+
fmt:
10+
runs-on: ubuntu-latest
11+
name: stable / fmt
12+
steps:
13+
- uses: actions/checkout@v3
14+
with:
15+
submodules: true
16+
- name: Install stable
17+
uses: dtolnay/rust-toolchain@stable
18+
with:
19+
components: rustfmt
20+
- name: cargo fmt --check
21+
run: cargo fmt --check
22+
clippy:
23+
runs-on: ubuntu-latest
24+
name: ${{ matrix.toolchain }} / clippy
25+
permissions:
26+
contents: read
27+
checks: write
28+
strategy:
29+
fail-fast: false
30+
matrix:
31+
toolchain: [stable, beta]
32+
steps:
33+
- uses: actions/checkout@v3
34+
with:
35+
submodules: true
36+
- name: Install ${{ matrix.toolchain }}
37+
uses: dtolnay/rust-toolchain@master
38+
with:
39+
toolchain: ${{ matrix.toolchain }}
40+
components: clippy
41+
- name: cargo clippy
42+
uses: actions-rs/clippy-check@v1
43+
with:
44+
token: ${{ secrets.GITHUB_TOKEN }}
45+
doc:
46+
runs-on: ubuntu-latest
47+
name: nightly / doc
48+
steps:
49+
- uses: actions/checkout@v3
50+
with:
51+
submodules: true
52+
- name: Install nightly
53+
uses: dtolnay/rust-toolchain@nightly
54+
- name: cargo doc
55+
run: cargo doc --no-deps --all-features
56+
env:
57+
RUSTDOCFLAGS: --cfg docsrs
58+
hack:
59+
runs-on: ubuntu-latest
60+
name: ubuntu / stable / features
61+
steps:
62+
- uses: actions/checkout@v3
63+
with:
64+
submodules: true
65+
- name: Install stable
66+
uses: dtolnay/rust-toolchain@stable
67+
- name: cargo install cargo-hack
68+
uses: taiki-e/install-action@cargo-hack
69+
- name: cargo hack
70+
run: cargo hack --feature-powerset check --lib --tests
71+
msrv:
72+
runs-on: ubuntu-latest
73+
# we use a matrix here just because env can't be used in job names
74+
# https://docs.github.com/en/actions/learn-github-actions/contexts#context-availability
75+
strategy:
76+
matrix:
77+
msrv: [1.56.1] # 2021 edition requires 1.56
78+
name: ubuntu / ${{ matrix.msrv }}
79+
steps:
80+
- uses: actions/checkout@v3
81+
with:
82+
submodules: true
83+
- name: Install ${{ matrix.msrv }}
84+
uses: dtolnay/rust-toolchain@master
85+
with:
86+
toolchain: ${{ matrix.msrv }}
87+
- name: cargo +${{ matrix.msrv }} check
88+
run: cargo check

.github/workflows/scheduled.yml

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
permissions:
2+
contents: read
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
schedule:
8+
- cron: '7 7 * * *'
9+
name: rolling
10+
jobs:
11+
# https://twitter.com/mycoliza/status/1571295690063753218
12+
nightly:
13+
runs-on: ubuntu-latest
14+
name: ubuntu / nightly
15+
steps:
16+
- uses: actions/checkout@v3
17+
with:
18+
submodules: true
19+
- name: Install nightly
20+
uses: dtolnay/rust-toolchain@nightly
21+
- name: cargo generate-lockfile
22+
if: hashFiles('Cargo.lock') == ''
23+
run: cargo generate-lockfile
24+
- name: cargo test --locked
25+
run: cargo test --locked --all-features --all-targets
26+
# https://twitter.com/alcuadrado/status/1571291687837732873
27+
update:
28+
runs-on: ubuntu-latest
29+
name: ubuntu / beta / updated
30+
# There's no point running this if no Cargo.lock was checked in in the
31+
# first place, since we'd just redo what happened in the regular test job.
32+
# Unfortunately, hashFiles only works in if on steps, so we reepeat it.
33+
# if: hashFiles('Cargo.lock') != ''
34+
steps:
35+
- uses: actions/checkout@v3
36+
with:
37+
submodules: true
38+
- name: Install beta
39+
if: hashFiles('Cargo.lock') != ''
40+
uses: dtolnay/rust-toolchain@beta
41+
- name: cargo update
42+
if: hashFiles('Cargo.lock') != ''
43+
run: cargo update
44+
- name: cargo test
45+
if: hashFiles('Cargo.lock') != ''
46+
run: cargo test --locked --all-features --all-targets
47+
env:
48+
RUSTFLAGS: -D deprecated

.github/workflows/test.yml

+85
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
permissions:
2+
contents: read
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
name: test
8+
jobs:
9+
required:
10+
runs-on: ubuntu-latest
11+
name: ubuntu / ${{ matrix.toolchain }}
12+
strategy:
13+
matrix:
14+
toolchain: [stable, beta]
15+
steps:
16+
- uses: actions/checkout@v3
17+
with:
18+
submodules: true
19+
- name: Install ${{ matrix.toolchain }}
20+
uses: dtolnay/rust-toolchain@master
21+
with:
22+
toolchain: ${{ matrix.toolchain }}
23+
- name: cargo generate-lockfile
24+
if: hashFiles('Cargo.lock') == ''
25+
run: cargo generate-lockfile
26+
# https://twitter.com/jonhoo/status/1571290371124260865
27+
- name: cargo test --locked
28+
run: cargo test --locked --all-features --all-targets
29+
minimal:
30+
runs-on: ubuntu-latest
31+
name: ubuntu / stable / minimal-versions
32+
steps:
33+
- uses: actions/checkout@v3
34+
with:
35+
submodules: true
36+
- name: Install stable
37+
uses: dtolnay/rust-toolchain@stable
38+
- name: Install nightly for -Zminimal-versions
39+
uses: dtolnay/rust-toolchain@nightly
40+
- name: rustup default stable
41+
run: rustup default stable
42+
- name: cargo update -Zminimal-versions
43+
run: cargo +nightly update -Zminimal-versions
44+
- name: cargo test
45+
run: cargo test --locked --all-features --all-targets
46+
os-check:
47+
runs-on: ${{ matrix.os }}
48+
name: ${{ matrix.os }} / stable
49+
strategy:
50+
fail-fast: false
51+
matrix:
52+
os: [macos-latest, windows-latest]
53+
steps:
54+
- uses: actions/checkout@v3
55+
with:
56+
submodules: true
57+
- name: Install stable
58+
uses: dtolnay/rust-toolchain@stable
59+
- name: cargo generate-lockfile
60+
if: hashFiles('Cargo.lock') == ''
61+
run: cargo generate-lockfile
62+
- name: cargo test
63+
run: cargo test --locked --all-features --all-targets
64+
coverage:
65+
runs-on: ubuntu-latest
66+
name: ubuntu / stable / coverage
67+
steps:
68+
- uses: actions/checkout@v3
69+
with:
70+
submodules: true
71+
- name: Install stable
72+
uses: dtolnay/rust-toolchain@stable
73+
with:
74+
components: llvm-tools-preview
75+
- name: cargo install cargo-llvm-cov
76+
uses: taiki-e/install-action@cargo-llvm-cov
77+
- name: cargo generate-lockfile
78+
if: hashFiles('Cargo.lock') == ''
79+
run: cargo generate-lockfile
80+
- name: cargo llvm-cov
81+
run: cargo llvm-cov --locked --all-features --lcov --output-path lcov.info
82+
- name: Upload to codecov.io
83+
uses: codecov/codecov-action@v3
84+
with:
85+
fail_ci_if_error: true

0 commit comments

Comments
 (0)