Skip to content

Commit 99e0a28

Browse files
Merge pull request #197 from tauri-apps/ci-setup
Improved CI setup
2 parents 4fc443e + 7664df8 commit 99e0a28

File tree

10 files changed

+137
-13
lines changed

10 files changed

+137
-13
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
RUSTFLAGS: ${{matrix.rustflags}} ${{env.RUSTFLAGS}}
4545

4646
msrv:
47-
name: Rust 1.70.0
47+
name: Rust MSRV
4848
needs: pre_ci
4949
if: needs.pre_ci.outputs.continue
5050
runs-on: ubuntu-latest
@@ -55,7 +55,9 @@ jobs:
5555
run: |
5656
sudo apt-get update
5757
sudo apt-get install -y webkit2gtk-4.0 libgtk-3-dev
58-
- uses: dtolnay/[email protected]
58+
- uses: dtolnay/rust-toolchain@stable
59+
with:
60+
toolchain: 1.70.0 # MSRV
5961
- uses: Swatinem/rust-cache@v2
6062
- run: cargo check --workspace --tests
6163

.github/workflows/spelling.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Spelling
2+
3+
permissions:
4+
contents: read
5+
6+
on: [pull_request]
7+
8+
env:
9+
RUST_BACKTRACE: 1
10+
CARGO_TERM_COLOR: always
11+
CLICOLOR: 1
12+
13+
jobs:
14+
spelling:
15+
name: Spell Check with Typos
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout Actions Repository
19+
uses: actions/checkout@v3
20+
- name: Spell Check Repo
21+
uses: crate-ci/typos@master

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "tauri-bindgen"
33
authors.workspace = true
44
version.workspace = true
55
edition.workspace = true
6-
rust-version.workspace = true
6+
rust-version.workspace = true # MSRV
77

88
[workspace]
99
members = ["crates/*"]

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Here are a few reasons why that is cool:
3434

3535
- **Compile-time Checks**
3636

37-
When using strongly typed languages, such as Rust, TypeScript or ReScript the generated code will automatically ensure that you are calling the API correctly, as long as it passes the type checking youre golden. This is especially neat **when working in a team**, so your colleagues can't just change command signatures and pull the rug out from under you.
37+
When using strongly typed languages, such as Rust, TypeScript or ReScript the generated code will automatically ensure that you are calling the API correctly, as long as it passes the type checking your golden. This is especially neat **when working in a team**, so your colleagues can't just change command signatures and pull the rug out from under you.
3838

3939
- **Easily auditable**
4040

crates/wit-parser/src/error.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ pub enum Error {
7676
#[label("cannot be defined twice")]
7777
location: Span,
7878
},
79-
/// Types can't recursively refer to themselves as that would make then possibly infinitly-sized.
79+
/// Types can't recursively refer to themselves as that would make then possibly infinitely-sized.
8080
/// In Rust the compiler would force you to use heap indirection, however such a thing doesn't exist in out type system.
8181
///
8282
/// This wouldn't be a problem with the current JSON format, but a custom binary one would have this limitation so for future proofing we deny recursive types.

docs/WIT.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ func greet(name: string) -> string
111111
At the top-level of each `wit` document lives the `interface` definition, file must contain exactly one such definition.
112112
The name you give to an interface will dictate the name of the generated module and printed debug output.
113113

114-
An interface may contain function declarations and type defintions. The order of declaration doesn't matter so you are free to define types after you have used them for example.
114+
An interface may contain function declarations and type definitions. The order of declaration doesn't matter so you are free to define types after you have used them for example.
115115

116116
```wit
117117
interface empty {}

renovate.json

Lines changed: 0 additions & 6 deletions
This file was deleted.

renovate.json5

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
{
2+
// schedule: [
3+
// 'before 5am on the first day of the month',
4+
//],
5+
semanticCommits: 'enabled',
6+
configMigration: true,
7+
dependencyDashboard: true,
8+
regexManagers: [
9+
{
10+
customType: 'regex',
11+
fileMatch: [
12+
'^rust-toolchain\\.toml$',
13+
'Cargo.toml$',
14+
'clippy.toml$',
15+
'\\.clippy.toml$',
16+
'^\\.github/workflows/ci.yml$',
17+
'^\\.github/workflows/rust-next.yml$',
18+
],
19+
matchStrings: [
20+
'MSRV.*?(?<currentValue>\\d+\\.\\d+(\\.\\d+)?)',
21+
'(?<currentValue>\\d+\\.\\d+(\\.\\d+)?).*?MSRV',
22+
],
23+
depNameTemplate: 'rust',
24+
packageNameTemplate: 'rust-lang/rust',
25+
datasourceTemplate: 'github-releases',
26+
},
27+
],
28+
packageRules: [
29+
{
30+
commitMessageTopic: 'MSRV',
31+
matchManagers: [
32+
'regex',
33+
],
34+
matchPackageNames: [
35+
'rust',
36+
],
37+
minimumReleaseAge: '252 days', // 6 releases * 6 weeks per release * 7 days per week
38+
internalChecksFilter: 'strict',
39+
},
40+
// Goals:
41+
// - Keep version reqs low, ignoring compatible normal/build dependencies
42+
// - Take advantage of latest dev-dependencies
43+
// - Rollup safe upgrades to reduce CI runner load
44+
// - Help keep number of versions down by always using latest breaking change
45+
// - Have lockfile and manifest in-sync
46+
{
47+
matchManagers: [
48+
'cargo',
49+
],
50+
matchDepTypes: [
51+
'build-dependencies',
52+
'dependencies',
53+
],
54+
matchCurrentVersion: '>=0.1.0',
55+
matchUpdateTypes: [
56+
'patch',
57+
],
58+
enabled: false,
59+
},
60+
{
61+
matchManagers: [
62+
'cargo',
63+
],
64+
matchDepTypes: [
65+
'build-dependencies',
66+
'dependencies',
67+
],
68+
matchCurrentVersion: '>=1.0.0',
69+
matchUpdateTypes: [
70+
'minor',
71+
],
72+
enabled: false,
73+
},
74+
{
75+
matchManagers: [
76+
'cargo',
77+
],
78+
matchDepTypes: [
79+
'dev-dependencies',
80+
],
81+
matchCurrentVersion: '>=0.1.0',
82+
matchUpdateTypes: [
83+
'patch',
84+
],
85+
automerge: true,
86+
groupName: 'compatible (dev)',
87+
},
88+
{
89+
matchManagers: [
90+
'cargo',
91+
],
92+
matchDepTypes: [
93+
'dev-dependencies',
94+
],
95+
matchCurrentVersion: '>=1.0.0',
96+
matchUpdateTypes: [
97+
'minor',
98+
],
99+
automerge: true,
100+
groupName: 'compatible (dev)',
101+
},
102+
],
103+
}

src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ struct Cli {
2929

3030
#[derive(Debug, Parser)]
3131
enum Command {
32-
/// Check a defintion file for errors.
32+
/// Check a definition file for errors.
3333
Check {
3434
#[clap(flatten)]
3535
world: WorldOpt,

typos.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[default.extend-words]
2+
# Abbreviations
3+
inout = "inout"
4+
ser = "ser"

0 commit comments

Comments
 (0)