Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Manishearth committed Nov 22, 2022
1 parent 74fea6e commit d185a89
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 35 deletions.
32 changes: 2 additions & 30 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -726,42 +726,14 @@ jobs:
runs-on: ubuntu-latest
steps:

# Cargo-make boilerplate
- name: Get cargo-make version
id: cargo-make-version
run: |
echo "::set-output name=hash::$(cargo search cargo-make | grep '^cargo-make =' | md5sum)"
shell: bash
- name: Attempt to load cached cargo-make
uses: actions/cache@v2
id: cargo-make-cache
with:
path: |
~/.cargo/bin/cargo-make
~/.cargo/bin/cargo-make.exe
key: ${{ runner.os }}-make-${{ steps.cargo-make-version.outputs.hash }}
- name: Install cargo-make
if: steps.cargo-make-cache.outputs.cache-hit != 'true'
uses: actions-rs/install@v0.1.2
with:
crate: cargo-make
version: latest
# We don't expect to keep being clippy-clean on nightly Rust,
# so the "toolchain boilerplate" is deliberately omitted

# Check if we need to force-nightly
- name: Check if we need to force-nightly
id: force_nightly
run: |
force_nightly_status=$(cargo make check-needs-force-nightly-ci)
echo "::set-output name=force_nightly_status::${force_nightly_status}"
# Clippy job > Install and run clippy steps

# We don't expect to keep being clippy-clean on nightly Rust
- name: Install clippy
if: steps.force_nightly.outputs.force_nightly_status != 'true'
run: rustup component add clippy

- uses: actions-rs/clippy-check@v1.0.7
if: steps.force_nightly.outputs.force_nightly_status != 'true'
with:
token: ${{ secrets.GITHUB_TOKEN }}
# keep args in sync with `clippy-all` in .cargo/config.toml
Expand Down
9 changes: 4 additions & 5 deletions Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ if not ${env_file}
end
needs_run = exec cargo make --loglevel error check-needs-force-nightly-ci
needs_run = trim ${needs_run.stdout}
if eq ${needs_run} "yes"
echo "Setting up CI environment for forced-nightly Rust build"
appendfile ${env_file} "ICU4X_NIGHTLY_TOOLCHAIN=nightly\n"
Expand All @@ -214,14 +214,13 @@ if not ${event_name}
exit 1
end
is_schedule = eq ${event_name} "schedule"
is_pr = eq ${event_name} "pull_request"
is_dispatch = eq ${event_name} "workflow_dispatch"
is_schedule = eq "${event_name}" "schedule"
is_pr = eq "${event_name}" "pull_request"
is_dispatch = eq "${event_name}" "workflow_dispatch"
dispatch_needs_nightly = set false
if is_dispatch
event_path = get_env GITHUB_EVENT_PATH
echo ${event_path}
event_file = readfile ${event_path}
event_json = json_parse ${event_file}
if ${event_json.inputs.nightly}
Expand Down

0 comments on commit d185a89

Please sign in to comment.