derive: implement #[valuable] attributes (#75) #1086
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
pull_request: | |
branches: | |
- master | |
push: | |
branches: | |
- master | |
schedule: | |
- cron: '0 2 * * 0' | |
env: | |
RUSTFLAGS: -Dwarnings | |
RUST_BACKTRACE: 1 | |
defaults: | |
run: | |
shell: bash | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} | |
cancel-in-progress: true | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Rust | |
run: rustup update stable | |
- run: cargo test --all-features --workspace | |
- run: cargo build --all-features --all-targets --workspace | |
minrust: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install cargo-hack | |
uses: taiki-e/install-action@cargo-hack | |
- run: cargo hack check --workspace --all-features --ignore-private --rust-version | |
no-std: | |
strategy: | |
fail-fast: false | |
matrix: | |
# thumbv7m-none-eabi supports atomic CAS. | |
# thumbv6m-none-eabi supports atomic load/store, but not atomic CAS. | |
target: | |
- thumbv6m-none-eabi | |
- thumbv7m-none-eabi | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Rust | |
run: rustup update stable | |
- name: Install cargo-hack | |
uses: taiki-e/install-action@cargo-hack | |
- run: rustup target add ${{ matrix.target }} | |
- run: cargo hack build --target ${{ matrix.target }} --feature-powerset --skip std,default | |
working-directory: valuable | |
- run: cargo hack build --target ${{ matrix.target }} --feature-powerset --skip std,default | |
working-directory: valuable-serde | |
features: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Rust | |
run: rustup update stable | |
- name: Install cargo-hack | |
uses: taiki-e/install-action@cargo-hack | |
- run: cargo hack build --workspace --feature-powerset | |
# When this job failed, run ci/no_atomic.sh and commit result changes. | |
codegen: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Rust | |
run: rustup update stable | |
- run: ci/no_atomic.sh | |
- run: git add -N . && git diff --exit-code | |
if: github.repository_owner != 'tokio-rs' || github.event_name != 'schedule' | |
- id: diff | |
run: | | |
git config user.name "Taiki Endo" | |
git config user.email "te316e89@gmail.com" | |
git add -N . | |
if ! git diff --exit-code; then | |
git add . | |
git commit -m "Update no_atomic.rs" | |
echo "::set-output name=success::false" | |
fi | |
if: github.repository_owner == 'tokio-rs' && github.event_name == 'schedule' | |
- uses: peter-evans/create-pull-request@v6 | |
with: | |
title: Update no_atomic.rs | |
body: | | |
Auto-generated by [create-pull-request][1] | |
[Please close and immediately reopen this pull request to run CI.][2] | |
[1]: https://github.com/peter-evans/create-pull-request | |
[2]: https://github.com/peter-evans/create-pull-request/blob/HEAD/docs/concepts-guidelines.md#workarounds-to-trigger-further-workflow-runs | |
branch: update-no-atomic-rs | |
if: github.repository_owner == 'tokio-rs' && github.event_name == 'schedule' && steps.diff.outputs.success == 'false' | |
fmt: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Rust | |
run: rustup update stable | |
- run: cargo fmt --all --check | |
docs: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Rust | |
run: rustup update nightly && rustup default nightly | |
- run: cargo doc --no-deps --all-features | |
env: | |
RUSTDOCFLAGS: -Dwarnings --cfg docsrs |