Skip to content

fix(code-editor): Avoid unreachable compilation error with no languag… #1928

fix(code-editor): Avoid unreachable compilation error with no languag…

fix(code-editor): Avoid unreachable compilation error with no languag… #1928

Workflow file for this run

name: Rust Lint
on:
workflow_dispatch:
push:
branches: [ "main" ]
pull_request:
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
concurrency:
group: rust-lint-${{ github.ref_name }}
cancel-in-progress: true
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 2
submodules: true
- name: Install linux dependencies
run: sudo apt update && sudo apt install build-essential libssl-dev pkg-config libglib2.0-dev libgtk-3-dev libudev-dev libxdo-dev libwebkit2gtk-4.1-dev
- name: Install just
uses: taiki-e/install-action@80e6af7a2ec7f280fffe2d0a9d3a12a9d11d86e9 # v2.75.1
with:
tool: just
- name: Install taplo
uses: taiki-e/install-action@80e6af7a2ec7f280fffe2d0a9d3a12a9d11d86e9 # v2.75.1
with:
tool: taplo
- name: Install Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@46268bd060767258de96ed93c1251119784f2ab6 # v1
with:
components: clippy
- name: Lint
run: just c-ci
# `nightly` needs to be installed just before running `rustfmt` to force CI to use `nightly`
- name: Get nightly toolchain version
run: echo "NIGHTLY_TOOLCHAIN=$(just rv-nightly)" >> $GITHUB_ENV
- name: Install nightly Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@46268bd060767258de96ed93c1251119784f2ab6 # v1
with:
toolchain: ${{ env.NIGHTLY_TOOLCHAIN }}
components: rustfmt
- name: Format
run: just f-check
build-macos:
runs-on: macos-latest
concurrency:
group: rust-lint-macos-${{ github.ref_name }}
cancel-in-progress: true
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 2
submodules: true
- name: Install just
uses: taiki-e/install-action@80e6af7a2ec7f280fffe2d0a9d3a12a9d11d86e9 # v2.75.1
with:
tool: just
- name: Install taplo
uses: taiki-e/install-action@80e6af7a2ec7f280fffe2d0a9d3a12a9d11d86e9 # v2.75.1
with:
tool: taplo
- name: Install Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@46268bd060767258de96ed93c1251119784f2ab6 # v1
with:
components: clippy
- name: Lint
run: just c-ci
# `nightly` needs to be installed just before running `rustfmt` to force CI to use `nightly`
- name: Get nightly toolchain version
run: echo "NIGHTLY_TOOLCHAIN=$(just rv-nightly)" >> $GITHUB_ENV
- name: Install nightly Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@46268bd060767258de96ed93c1251119784f2ab6 # v1
with:
toolchain: ${{ env.NIGHTLY_TOOLCHAIN }}
components: rustfmt
- name: Format
run: just f-check