Skip to content

Commit f8ad9c1

Browse files
authoredNov 19, 2024··
[chore] merge v0.51.0 (#29)
I needed to skip `parse_position_negative` test case due to conflict with local changes that was made [here](2202e80). Please me know if there is something better we could have done there.
2 parents 9c6ec54 + 8c31c8d commit f8ad9c1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+6860
-933
lines changed
 
+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
name: Prepare Rust Builder
19+
description: 'Prepare Rust Build Environment'
20+
inputs:
21+
rust-version:
22+
description: 'version of rust to install (e.g. stable)'
23+
required: true
24+
default: 'stable'
25+
targets:
26+
description: 'The toolchain targets to add, comma-separated'
27+
default: ''
28+
29+
runs:
30+
using: "composite"
31+
steps:
32+
- name: Setup Rust Toolchain
33+
shell: bash
34+
run: |
35+
echo "Installing ${{ inputs.rust-version }}"
36+
if [ -n "${{ inputs.targets}}" ]; then
37+
rustup toolchain install ${{ inputs.rust-version }} -t ${{ inputs.targets }}
38+
else
39+
rustup toolchain install ${{ inputs.rust-version }}
40+
fi
41+
rustup default ${{ inputs.rust-version }}
42+
rustup component add rustfmt clippy

‎.github/workflows/rust.yml

+26-29
Original file line numberDiff line numberDiff line change
@@ -7,52 +7,49 @@ jobs:
77
codestyle:
88
runs-on: ubuntu-latest
99
steps:
10-
- name: Set up Rust
11-
uses: hecrj/setup-rust-action@v1
10+
- uses: actions/checkout@v4
11+
- name: Setup Rust Toolchain
12+
uses: ./.github/actions/setup-builder
1213
with:
13-
components: rustfmt
1414
# Note that `nightly` is required for `license_template_path`, as
1515
# it's an unstable feature.
1616
rust-version: nightly
17-
- uses: actions/checkout@v2
1817
- run: cargo +nightly fmt -- --check --config-path <(echo 'license_template_path = "HEADER"')
1918

2019
lint:
2120
runs-on: ubuntu-latest
2221
steps:
23-
- name: Set up Rust
24-
uses: hecrj/setup-rust-action@v1
25-
with:
26-
components: clippy
27-
- uses: actions/checkout@v2
22+
- uses: actions/checkout@v4
23+
- name: Setup Rust Toolchain
24+
uses: ./.github/actions/setup-builder
2825
- run: cargo clippy --all-targets --all-features -- -D warnings
2926

3027
compile:
3128
runs-on: ubuntu-latest
3229
steps:
33-
- name: Set up Rust
34-
uses: hecrj/setup-rust-action@v1
35-
- uses: actions/checkout@master
30+
- uses: actions/checkout@v4
31+
- name: Setup Rust Toolchain
32+
uses: ./.github/actions/setup-builder
3633
- run: cargo check --all-targets --all-features
3734

3835
docs:
3936
runs-on: ubuntu-latest
4037
env:
4138
RUSTDOCFLAGS: "-Dwarnings"
4239
steps:
43-
- name: Set up Rust
44-
uses: hecrj/setup-rust-action@v1
45-
- uses: actions/checkout@master
40+
- uses: actions/checkout@v4
41+
- name: Setup Rust Toolchain
42+
uses: ./.github/actions/setup-builder
4643
- run: cargo doc --document-private-items --no-deps --workspace --all-features
4744

4845
compile-no-std:
4946
runs-on: ubuntu-latest
5047
steps:
51-
- name: Set up Rust
52-
uses: hecrj/setup-rust-action@v1
48+
- uses: actions/checkout@v4
49+
- name: Setup Rust Toolchain
50+
uses: ./.github/actions/setup-builder
5351
with:
5452
targets: 'thumbv6m-none-eabi'
55-
- uses: actions/checkout@master
5653
- run: cargo check --no-default-features --target thumbv6m-none-eabi
5754

5855
test:
@@ -61,8 +58,10 @@ jobs:
6158
rust: [stable, beta, nightly]
6259
runs-on: ubuntu-latest
6360
steps:
64-
- name: Setup Rust
65-
uses: hecrj/setup-rust-action@v1
61+
- name: Checkout
62+
uses: actions/checkout@v4
63+
- name: Setup Rust Toolchain
64+
uses: ./.github/actions/setup-builder
6665
with:
6766
rust-version: ${{ matrix.rust }}
6867
- name: Install Tarpaulin
@@ -71,16 +70,16 @@ jobs:
7170
crate: cargo-tarpaulin
7271
version: 0.14.2
7372
use-tool-cache: true
74-
- name: Checkout
75-
uses: actions/checkout@v2
7673
- name: Test
7774
run: cargo test --all-features
7875

7976
test-coverage:
8077
runs-on: ubuntu-latest
8178
steps:
82-
- name: Setup Rust
83-
uses: hecrj/setup-rust-action@v1
79+
- name: Checkout
80+
uses: actions/checkout@v4
81+
- name: Setup Rust Toolchain
82+
uses: ./.github/actions/setup-builder
8483
with:
8584
rust-version: stable
8685
- name: Install Tarpaulin
@@ -89,8 +88,6 @@ jobs:
8988
crate: cargo-tarpaulin
9089
version: 0.14.2
9190
use-tool-cache: true
92-
- name: Checkout
93-
uses: actions/checkout@v2
9491
- name: Coverage
9592
run: cargo tarpaulin -o Lcov --output-dir ./coverage
9693
- name: Coveralls
@@ -103,9 +100,9 @@ jobs:
103100
runs-on: ubuntu-latest
104101
needs: [test]
105102
steps:
106-
- name: Set up Rust
107-
uses: hecrj/setup-rust-action@v1
108-
- uses: actions/checkout@v2
103+
- uses: actions/checkout@v4
104+
- name: Setup Rust Toolchain
105+
uses: ./.github/actions/setup-builder
109106
- name: Publish
110107
shell: bash
111108
run: |

0 commit comments

Comments
 (0)
Please sign in to comment.