Skip to content

Commit

Permalink
Update no_atomic.rs and CI config (#124)
Browse files Browse the repository at this point in the history
Co-authored-by: Taiki Endo <[email protected]>
  • Loading branch information
github-actions[bot] and taiki-e authored Jan 6, 2024
1 parent d9f4421 commit b4103db
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 14 deletions.
22 changes: 10 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install Rust
run: rustup update stable
- run: cargo test --all-features --workspace
Expand All @@ -28,11 +28,9 @@ jobs:
minrust:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ env.minrust }}
override: true
- uses: actions/checkout@v4
- name: Install Rust
run: rustup update ${{ env.minrust }} && rustup default ${{ env.minrust }}
- run: cargo check --workspace --all-features

no-std:
Expand All @@ -48,7 +46,7 @@ jobs:
- riscv32i-unknown-none-elf
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install Rust
run: rustup update stable
- name: Install cargo-hack
Expand All @@ -62,7 +60,7 @@ jobs:
features:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install Rust
run: rustup update stable
- name: Install cargo-hack
Expand All @@ -73,9 +71,9 @@ jobs:
codegen:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install Rust
run: rustup update nightly && rustup default nightly
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'
Expand Down Expand Up @@ -105,15 +103,15 @@ jobs:
fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- 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@v3
- uses: actions/checkout@v4
- name: Install Rust
run: rustup update nightly && rustup default nightly
- run: cargo doc --no-deps --all-features
Expand Down
5 changes: 3 additions & 2 deletions ci/no_atomic.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ file="valuable/no_atomic.rs"
no_atomic_cas=()
no_atomic_64=()
no_atomic=()
for target in $(rustc --print target-list); do
target_spec=$(rustc --print target-spec-json -Z unstable-options --target "${target}")
for target_spec in $(RUSTC_BOOTSTRAP=1 rustc +stable -Z unstable-options --print all-target-specs-json | jq -c '. | to_entries | .[]'); do
target=$(jq <<<"${target_spec}" -r '.key')
target_spec=$(jq <<<"${target_spec}" -c '.value')
res=$(jq <<<"${target_spec}" -r 'select(."atomic-cas" == false)')
[[ -z "${res}" ]] || no_atomic_cas+=("${target}")
max_atomic_width=$(jq <<<"${target_spec}" -r '."max-atomic-width"')
Expand Down

0 comments on commit b4103db

Please sign in to comment.