tools: Clean up tidy.sh #1914
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 | |
permissions: | |
contents: read | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
- dev | |
schedule: | |
- cron: '0 0 * * *' | |
workflow_dispatch: | |
defaults: | |
run: | |
shell: bash --noprofile --norc -CeEuxo pipefail {0} | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} | |
cancel-in-progress: true | |
jobs: | |
tidy: | |
uses: taiki-e/github-actions/.github/workflows/tidy.yml@main | |
permissions: | |
contents: read | |
pull-requests: write # for gh pr edit --add-assignee | |
repository-projects: read # for gh pr edit --add-assignee | |
secrets: inherit | |
free-device-space: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- ubuntu-22.04 | |
- ubuntu-22.04-arm | |
- ubuntu-24.04 | |
# - os: ubuntu-24.04-arm # TODO: re-enable when https://github.com/rust-lang/rust/issues/135867 solved | |
- macos-13 | |
- macos-14 | |
- macos-15 | |
- windows-2019 | |
- windows-2022 | |
- windows-2025 | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: taiki-e/checkout-action@v1 | |
- name: Run du -h | |
run: | | |
sudo du / -h -d1 2>/dev/null || true | |
sudo du /home -h -d2 || true | |
sudo du /opt -h -d2 || true | |
sudo du /usr -h -d2 || true | |
sudo du /usr/local/lib -h -d1 || true | |
sudo du /usr/local/share -h -d1 || true | |
sudo du /var -h -d1 || true | |
sudo du /var/lib -h -d1 || true | |
if: startsWith(matrix.os, 'ubuntu') | |
- run: | | |
xcode-select --print-path | |
# shellcheck disable=SC2010 | |
ls -- /Applications | grep -F Xcode | |
if: startsWith(matrix.os, 'macos') | |
- uses: ./free-device-space | |
- name: Run du -h | |
run: | | |
sudo du / -h -d1 2>/dev/null || true | |
sudo du /home -h -d2 || true | |
sudo du /opt -h -d2 || true | |
sudo du /usr -h -d2 || true | |
sudo du /usr/local/lib -h -d1 || true | |
sudo du /usr/local/share -h -d1 || true | |
sudo du /var -h -d1 || true | |
sudo du /var/lib -h -d1 || true | |
if: startsWith(matrix.os, 'ubuntu') | |
- run: | | |
xcode-select --print-path | |
# shellcheck disable=SC2010 | |
ls -- /Applications | grep -F Xcode | |
if: startsWith(matrix.os, 'macos') | |
install-rust: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- ubuntu-latest | |
- ubuntu-22.04-arm # TODO: update to 24.04 when https://github.com/rust-lang/rust/issues/135867 solved | |
- macos-latest | |
- windows-latest | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: taiki-e/checkout-action@v1 | |
- uses: ./install-rust | |
with: | |
toolchain: nightly | |
component: rustfmt,clippy | |
target: x86_64-unknown-linux-musl,i686-unknown-linux-gnu | |
- run: | | |
rustc -Vv | |
rustup -V | |
cargo -Vv | |
rustfmt -V | |
cargo clippy -V | |
rustup component list | |
rustup target list | |
setup-docker: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- ubuntu-latest | |
- ubuntu-22.04-arm # TODO: update to 24.04 when https://github.com/rust-lang/rust/issues/135867 solved | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: taiki-e/checkout-action@v1 | |
- uses: ./setup-docker | |
cspell-dict: | |
runs-on: ubuntu-latest | |
timeout-minutes: 60 | |
steps: | |
- uses: taiki-e/checkout-action@v1 | |
- run: tools/cspell-dict.sh clean | |
- run: git add -N . && git diff --exit-code |