Skip to content

Commit 9d6dded

Browse files
committed
Squashed commit of the following:
commit fabb82abd53e0052c8b70ae197a80e6203ede26d Author: Jon Gjengset <[email protected]> Date: Tue Nov 19 12:08:56 2024 +0100 Upgrade codecov-action to v5 See codecov/codecov-action#1645. commit c6a836118612ec10478df972f523000eb4387339 Author: cospectrum <[email protected]> Date: Sat Sep 14 11:18:31 2024 +0300 fix shell-check (#24) commit 5ed5ed26c75685740abb4af25c17b18cc091edcf Author: Charles Edward Gagnon <[email protected]> Date: Sun Aug 18 03:28:39 2024 -0400 documentation check with `cargo-docs-rs` (#23) commit 799c99e0cf77d2289ab47e84fa3b8296cfc5beb1 Author: Jon Gjengset <[email protected]> Date: Sun Jul 7 10:18:50 2024 +0200 Revert "More intelligent dependabot behaviour" This reverts commit dcf68836181145511a35a269e8392d0a0f0c61e1. Will not work due to dependabot/dependabot-core#10160 commit dcf68836181145511a35a269e8392d0a0f0c61e1 Author: Jon Gjengset <[email protected]> Date: Sun Jul 7 10:05:52 2024 +0200 More intelligent dependabot behaviour commit 528977532c28ad859bea7ba0cb5e6cb3e0fce56b Author: Jon Gjengset <[email protected]> Date: Sun Mar 31 10:42:53 2024 +0200 Add cargo-semver-checks commit caa3616c250361bac585b6979e5390e403b45097 Author: Jon Gjengset <[email protected]> Date: Sat Feb 3 09:44:41 2024 +0100 Uniform capitalization commit f8f04aefdf3c756e6a769399ce2ac89979338ad0 Author: Jon Gjengset <[email protected]> Date: Sat Feb 3 09:31:12 2024 +0100 Semi-breaking: update codecov action Note: this requires adding `CODECOV_TOKEN` to your GitHub repository's secrets! See associated comment in the commit content. commit f505e09b2a145de0df7445ca0ebe1f98b52ab3bc Author: rtkay123 <[email protected]> Date: Sat Jan 20 11:10:51 2024 +0200 replace actions-rs/clippy-check with giraffate/clippy-action (#19) Co-authored-by: rtkay123 <[email protected]> commit a13691528b3f1918594bfc53db8cf5ad0240c59e Author: Jon Gjengset <[email protected]> Date: Sun Dec 17 18:15:06 2023 +0100 Remove stray trailing whitespace commit 60fdfbb65055e7e852820a75d9cf80b88d020702 Author: Anas <[email protected]> Date: Sun Dec 17 17:52:41 2023 +0200 chore: fix typos (#17) commit 3d6ab95662ede7ae2898cdc7bd5b75668c7b8ca0 Author: Mathias Pius <[email protected]> Date: Sat Nov 11 15:01:33 2023 +0100 Nit: Selecting direct minimal versions flag is -Zdirect-minimal-versions (#16) commit bfee1175f6378c9191eca0af88e068ed49d48bef Author: Josh McKinney <[email protected]> Date: Sat Nov 11 01:14:12 2023 -0800 docs: Add documentation based on the youtube video (#10) commit deb9fd3f46de5eebd2583292362a161b1d1c56c4 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat Sep 9 16:21:14 2023 +0200 Bump actions/checkout from 3 to 4 (#13) Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@v3...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> commit 7c327ddf5b42f5309f564da8275c789c4a22fdbb Author: Jon Gjengset <[email protected]> Date: Sun Aug 20 15:12:25 2023 +0200 Don't install OpenSSL on Windows by default commit c704bcc656871d37f93f79234c4d530522ac8733 Author: Rod Elias <[email protected]> Date: Sun Aug 20 09:40:15 2023 -0300 Install Openssl for Windows (#12) commit 99f108f93c4f09906a4ddd4506fa4a2cbc68169d Author: James Chacon <[email protected]> Date: Sun Aug 13 03:13:38 2023 -0700 Quote MSRV version to avoid float parsing (#11) Put 1.70 in there (for instance if you want to pin against OnceLock stabilizing) and it will actually test 1.7 as it appears github auto converts this to a float? Putting in quotes seems to do the right thing here commit 6332a3af21a58f811a681a98cd44d0f5da8a1891 Author: Jon Gjengset <[email protected]> Date: Mon Apr 24 12:40:14 2023 -0700 [sanity] More robust injection of opt-level 1 (#9) Fixes #8 commit 16a2c2925eb46e24208b20bca567f1e7546f4e2f Author: Simen Bekkhus <[email protected]> Date: Sat Apr 8 18:57:54 2023 +0200 chore: automatically cancel superseded Actions runs (#5) commit 80a89195f2ac9971ecff9d422a6bb83b3f84e0bc Author: Burkhard Mittelbach <[email protected]> Date: Mon Mar 20 01:18:49 2023 +0100 Add action to run doctest. (#3) `cargo test --all-features` does not run doc-tests. For more information see rust-lang/cargo#6669. commit 0d12c82bf4a89014643cd2b7991c63da9dd8b15b Author: Tudyx <[email protected]> Date: Mon Mar 20 01:17:59 2023 +0100 Unbreak cargo hack for non-libraries (#4) 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 31431a6 commit 9d6dded

File tree

6 files changed

+403
-0
lines changed

6 files changed

+403
-0
lines changed

.github/DOCS.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Github config and workflows
2+
3+
In this folder there is configuration for codecoverage, dependabot, and ci
4+
workflows that check the library more deeply than the default configurations.
5+
6+
This folder can be or was merged using a --allow-unrelated-histories merge
7+
strategy from <https://github.com/jonhoo/rust-ci-conf/> which provides a
8+
reasonably sensible base for writing your own ci on. By using this strategy
9+
the history of the CI repo is included in your repo, and future updates to
10+
the CI can be merged later.
11+
12+
To perform this merge run:
13+
14+
```shell
15+
git remote add ci https://github.com/jonhoo/rust-ci-conf.git
16+
git fetch ci
17+
git merge --allow-unrelated-histories ci/main
18+
```
19+
20+
An overview of the files in this project is available at:
21+
<https://www.youtube.com/watch?v=xUH-4y92jPg&t=491s>, which contains some
22+
rationale for decisions and runs through an example of solving minimal version
23+
and OpenSSL issues.

.github/codecov.yml

Lines changed: 21 additions & 0 deletions
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: true

.github/dependabot.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
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
11+
ignore:
12+
- dependency-name: "*"
13+
# patch and minor updates don't matter for libraries as consumers of this library build
14+
# with their own lockfile, rather than the version specified in this library's lockfile
15+
# remove this ignore rule if your package has binaries to ensure that the binaries are
16+
# built with the exact set of dependencies and those are up to date.
17+
update-types:
18+
- "version-update:semver-patch"
19+
- "version-update:semver-minor"

.github/workflows/check.yml

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
# This workflow runs whenever a PR is opened or updated, or a commit is pushed to main. It runs
2+
# several checks:
3+
# - fmt: checks that the code is formatted according to rustfmt
4+
# - clippy: checks that the code does not contain any clippy warnings
5+
# - doc: checks that the code can be documented without errors
6+
# - hack: check combinations of feature flags
7+
# - msrv: check that the msrv specified in the crate is correct
8+
permissions:
9+
contents: read
10+
# This configuration allows maintainers of this repo to create a branch and pull request based on
11+
# the new branch. Restricting the push trigger to the main branch ensures that the PR only gets
12+
# built once.
13+
on:
14+
push:
15+
branches: [main]
16+
pull_request:
17+
# If new code is pushed to a PR branch, then cancel in progress workflows for that PR. Ensures that
18+
# we don't waste CI time, and returns results quicker https://github.com/jonhoo/rust-ci-conf/pull/5
19+
concurrency:
20+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
21+
cancel-in-progress: true
22+
name: check
23+
jobs:
24+
fmt:
25+
runs-on: ubuntu-latest
26+
name: stable / fmt
27+
steps:
28+
- uses: actions/checkout@v4
29+
with:
30+
submodules: true
31+
- name: Install stable
32+
uses: dtolnay/rust-toolchain@stable
33+
with:
34+
components: rustfmt
35+
- name: cargo fmt --check
36+
run: cargo fmt --check
37+
clippy:
38+
runs-on: ubuntu-latest
39+
name: ${{ matrix.toolchain }} / clippy
40+
permissions:
41+
contents: read
42+
checks: write
43+
strategy:
44+
fail-fast: false
45+
matrix:
46+
# Get early warning of new lints which are regularly introduced in beta channels.
47+
toolchain: [stable, beta]
48+
steps:
49+
- uses: actions/checkout@v4
50+
with:
51+
submodules: true
52+
- name: Install ${{ matrix.toolchain }}
53+
uses: dtolnay/rust-toolchain@master
54+
with:
55+
toolchain: ${{ matrix.toolchain }}
56+
components: clippy
57+
- name: cargo clippy
58+
uses: giraffate/clippy-action@v1
59+
with:
60+
reporter: 'github-pr-check'
61+
github_token: ${{ secrets.GITHUB_TOKEN }}
62+
semver:
63+
runs-on: ubuntu-latest
64+
name: semver
65+
steps:
66+
- uses: actions/checkout@v4
67+
with:
68+
submodules: true
69+
- name: Install stable
70+
uses: dtolnay/rust-toolchain@stable
71+
with:
72+
components: rustfmt
73+
- name: cargo-semver-checks
74+
uses: obi1kenobi/cargo-semver-checks-action@v2
75+
doc:
76+
# run docs generation on nightly rather than stable. This enables features like
77+
# https://doc.rust-lang.org/beta/unstable-book/language-features/doc-cfg.html which allows an
78+
# API be documented as only available in some specific platforms.
79+
runs-on: ubuntu-latest
80+
name: nightly / doc
81+
steps:
82+
- uses: actions/checkout@v4
83+
with:
84+
submodules: true
85+
- name: Install nightly
86+
uses: dtolnay/rust-toolchain@nightly
87+
- name: Install cargo-docs-rs
88+
uses: dtolnay/install@cargo-docs-rs
89+
- name: cargo docs-rs
90+
run: cargo docs-rs
91+
hack:
92+
# cargo-hack checks combinations of feature flags to ensure that features are all additive
93+
# which is required for feature unification
94+
runs-on: ubuntu-latest
95+
name: ubuntu / stable / features
96+
steps:
97+
- uses: actions/checkout@v4
98+
with:
99+
submodules: true
100+
- name: Install stable
101+
uses: dtolnay/rust-toolchain@stable
102+
- name: cargo install cargo-hack
103+
uses: taiki-e/install-action@cargo-hack
104+
# intentionally no target specifier; see https://github.com/jonhoo/rust-ci-conf/pull/4
105+
# --feature-powerset runs for every combination of features
106+
- name: cargo hack
107+
run: cargo hack --feature-powerset check
108+
msrv:
109+
# check that we can build using the minimal rust version that is specified by this crate
110+
runs-on: ubuntu-latest
111+
# we use a matrix here just because env can't be used in job names
112+
# https://docs.github.com/en/actions/learn-github-actions/contexts#context-availability
113+
strategy:
114+
matrix:
115+
msrv: ["1.56.1"] # 2021 edition requires 1.56
116+
name: ubuntu / ${{ matrix.msrv }}
117+
steps:
118+
- uses: actions/checkout@v4
119+
with:
120+
submodules: true
121+
- name: Install ${{ matrix.msrv }}
122+
uses: dtolnay/rust-toolchain@master
123+
with:
124+
toolchain: ${{ matrix.msrv }}
125+
- name: cargo +${{ matrix.msrv }} check
126+
run: cargo check

.github/workflows/scheduled.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Run scheduled (rolling) jobs on a nightly basis, as your crate may break independently of any
2+
# given PR. E.g., updates to rust nightly and updates to this crates dependencies. See check.yml for
3+
# information about how the concurrency cancellation and workflow triggering works
4+
permissions:
5+
contents: read
6+
on:
7+
push:
8+
branches: [main]
9+
pull_request:
10+
schedule:
11+
- cron: '7 7 * * *'
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
14+
cancel-in-progress: true
15+
name: rolling
16+
jobs:
17+
# https://twitter.com/mycoliza/status/1571295690063753218
18+
nightly:
19+
runs-on: ubuntu-latest
20+
name: ubuntu / nightly
21+
steps:
22+
- uses: actions/checkout@v4
23+
with:
24+
submodules: true
25+
- name: Install nightly
26+
uses: dtolnay/rust-toolchain@nightly
27+
- name: cargo generate-lockfile
28+
if: hashFiles('Cargo.lock') == ''
29+
run: cargo generate-lockfile
30+
- name: cargo test --locked
31+
run: cargo test --locked --all-features --all-targets
32+
# https://twitter.com/alcuadrado/status/1571291687837732873
33+
update:
34+
# This action checks that updating the dependencies of this crate to the latest available that
35+
# satisfy the versions in Cargo.toml does not break this crate. This is important as consumers
36+
# of this crate will generally use the latest available crates. This is subject to the standard
37+
# Cargo semver rules (i.e cargo does not update to a new major version unless explicitly told
38+
# to).
39+
runs-on: ubuntu-latest
40+
name: ubuntu / beta / updated
41+
# There's no point running this if no Cargo.lock was checked in in the first place, since we'd
42+
# just redo what happened in the regular test job. Unfortunately, hashFiles only works in if on
43+
# steps, so we repeat it.
44+
steps:
45+
- uses: actions/checkout@v4
46+
with:
47+
submodules: true
48+
- name: Install beta
49+
if: hashFiles('Cargo.lock') != ''
50+
uses: dtolnay/rust-toolchain@beta
51+
- name: cargo update
52+
if: hashFiles('Cargo.lock') != ''
53+
run: cargo update
54+
- name: cargo test
55+
if: hashFiles('Cargo.lock') != ''
56+
run: cargo test --locked --all-features --all-targets
57+
env:
58+
RUSTFLAGS: -D deprecated

0 commit comments

Comments
 (0)