Skip to content

Commit

Permalink
Merge pull request #83 from yangby-cryptape/ci/upgrade-the-script
Browse files Browse the repository at this point in the history
ci: upgrade ci deps and the rust-toolchain
  • Loading branch information
yangby-cryptape authored Jan 12, 2024
2 parents c03e59c + 6b4d191 commit 0b81c67
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 36 deletions.
38 changes: 14 additions & 24 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,27 +16,23 @@ jobs:
name: Checks / Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Setup
uses: actions-rs/toolchain@v1
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
profile: minimal
toolchain: 1.58.1
override: true
toolchain: 1.75.0
components: rustfmt
- name: Run
run: make fmt
clippy:
name: Checks / Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Setup
uses: actions-rs/toolchain@v1
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
profile: minimal
toolchain: 1.71.1
override: true
toolchain: 1.75.0
components: clippy
- name: Run
run: make clippy
Expand All @@ -45,41 +41,35 @@ jobs:
needs: [ rustfmt, clippy ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Setup
uses: actions-rs/toolchain@v1
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
profile: minimal
toolchain: 1.56.1 # MSRV
override: true
- name: Run
run: make ci-msrv
test-crates:
name: Tests / Build & Test
needs: [ rustfmt, clippy ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Setup
uses: actions-rs/toolchain@v1
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
profile: minimal
toolchain: 1.58.1
override: true
toolchain: 1.75.0
- name: Run
run: make ci-crates
test-examples:
name: Tests / Run Examples
needs: [ rustfmt, clippy ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Setup
uses: actions-rs/toolchain@v1
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
profile: minimal
toolchain: 1.58.1
override: true
toolchain: 1.75.0
- name: Run
run: make ci-examples
success:
Expand Down
2 changes: 1 addition & 1 deletion tools/codegen/src/generator/languages/c/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use case::CaseExt;
use crate::{ast, C_API_VERSION_MIN, VERSION};

#[macro_use]
pub(self) mod utilities;
mod utilities;

mod import;

Expand Down
20 changes: 10 additions & 10 deletions tools/codegen/src/generator/languages/rust/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,29 @@ use quote::quote;

use crate::{ast, VERSION};

pub(self) mod utilities;
mod utilities;

pub(self) mod builder;
pub(self) mod entity;
pub(self) mod reader;
mod builder;
mod entity;
mod reader;

/// Constants for `{ Entity, Reader }`
pub(self) mod display;
mod display;

/// Constants for `{ Entity, Reader, Builder }`
pub(self) mod constants;
mod constants;

/// Constants for `{ Entity, Reader }`
pub(self) mod properties;
mod properties;

/// Constants for `{ Entity, Reader }`
pub(self) mod getters;
mod getters;

/// Iterator for `{ Union } x { Entity, Reader }`
pub(self) mod iterator;
mod iterator;

/// Enumerator for `{ Vector } x { Entity, Reader }`
pub(self) mod enumerator;
mod enumerator;

mod import;
use import::GenImport as _;
Expand Down
2 changes: 1 addition & 1 deletion tools/codegen/src/parser/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ union Foo {
let ast0 = Parser::parse(&schema_file0.into_temp_path());
let ast1 = Parser::parse(&schema_file1.into_temp_path());

for ast in vec![ast0, ast1] {
for ast in [ast0, ast1] {
// get union items
if let TopDecl::Union(union) = ast
.decls()
Expand Down

0 comments on commit 0b81c67

Please sign in to comment.