chore(ci): switch to actions-rust-lang

This commit is contained in:
Vukašin Vojinović 2026-06-14 17:18:36 +02:00 committed by Michael Murphy
parent a991d7bb43
commit f79ccb8cba
2 changed files with 28 additions and 54 deletions

View file

@ -6,24 +6,17 @@ on:
- master - master
pull_request: pull_request:
jobs: jobs:
format: format:
runs-on: ubuntu-22.04 runs-on: ubuntu-latest
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v3 uses: actions/checkout@v6
- name: Rust toolchain - name: Rust toolchain
uses: dtolnay/rust-toolchain@stable uses: actions-rust-lang/setup-rust-toolchain@v1
with: with:
components: rustfmt components: rustfmt
- name: Cargo cache rustflags: ""
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-cargo-rust_stable-${{ hashFiles('**/Cargo.toml') }}
- name: Format - name: Format
run: cargo fmt -- --check run: cargo fmt -- --check
@ -34,38 +27,28 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
test_args: test_args:
- --no-default-features --features "" # for cosmic-comp, don't remove! - --no-default-features --features "" # for cosmic-comp, don't remove!
- --no-default-features --features "winit_debug" - --no-default-features --features "winit_debug"
- --no-default-features --features "winit_tokio" - --no-default-features --features "winit_tokio"
- --no-default-features --features "winit" - --no-default-features --features "winit"
- --no-default-features --features "winit_wgpu" - --no-default-features --features "winit_wgpu"
- --no-default-features --features "wayland" - --no-default-features --features "wayland"
- --no-default-features --features "applet" - --no-default-features --features "applet"
- --no-default-features --features "desktop,smol" - --no-default-features --features "desktop,smol"
- --no-default-features --features "desktop,tokio" - --no-default-features --features "desktop,tokio"
- -p cosmic-theme - -p cosmic-theme
runs-on: ubuntu-22.04 runs-on: ubuntu-latest
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v3 uses: actions/checkout@v6
with: with:
submodules: recursive submodules: recursive
- name: Get date for registry cache
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
- name: Cargo registry cache
uses: actions/cache@v3
with:
path: |
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git
key: ${{ runner.os }}-cargo-registry-${{ steps.date.outputs.date }}
restore-keys: ${{ runner.os }}-cargo-registry-
- name: System dependencies - name: System dependencies
run: sudo apt-get update; sudo apt-get install -y libxkbcommon-dev libwayland-dev run: sudo apt-get update; sudo apt-get install -y libxkbcommon-dev libwayland-dev
- name: Rust toolchain - name: Rust toolchain
uses: dtolnay/rust-toolchain@stable uses: actions-rust-lang/setup-rust-toolchain@v1
with:
rustflags: ""
- name: Test features - name: Test features
run: cargo test ${{ matrix.test_args }} -- --test-threads=1 run: cargo test ${{ matrix.test_args }} -- --test-threads=1
env: env:
@ -82,28 +65,18 @@ jobs:
- "open-dialog" - "open-dialog"
- "context-menu" - "context-menu"
- "nav-context" - "nav-context"
runs-on: ubuntu-22.04 runs-on: ubuntu-latest
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v3 uses: actions/checkout@v6
with: with:
submodules: recursive submodules: recursive
- name: Get date for registry cache
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
- name: Cargo registry cache
uses: actions/cache@v3
with:
path: |
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git
key: ${{ runner.os }}-cargo-registry-${{ steps.date.outputs.date }}
restore-keys: ${{ runner.os }}-cargo-registry-
- name: System dependencies - name: System dependencies
run: sudo apt-get update; sudo apt-get install -y libxkbcommon-dev libwayland-dev run: sudo apt-get update; sudo apt-get install -y libxkbcommon-dev libwayland-dev
- name: Rust toolchain - name: Rust toolchain
uses: dtolnay/rust-toolchain@stable uses: actions-rust-lang/setup-rust-toolchain@v1
with:
rustflags: ""
- name: Check example - name: Check example
run: cargo check -p "${{ matrix.examples }}" run: cargo check -p "${{ matrix.examples }}"
env: env:

View file

@ -11,13 +11,14 @@ jobs:
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v3 uses: actions/checkout@v6
with: with:
submodules: recursive submodules: recursive
- name: Install Rust nightly - name: Install Rust nightly
uses: dtolnay/rust-toolchain@master uses: actions-rust-lang/setup-rust-toolchain@v1
with: with:
toolchain: nightly-2026-04-27 toolchain: nightly-2026-04-27
rustflags: ""
- name: System dependencies - name: System dependencies
run: sudo apt-get update; sudo apt-get install -y libxkbcommon-dev libwayland-dev run: sudo apt-get update; sudo apt-get install -y libxkbcommon-dev libwayland-dev
- name: Build documentation - name: Build documentation
@ -29,7 +30,7 @@ jobs:
-p libcosmic \ -p libcosmic \
--verbose --features tokio,winit,wayland,desktop,single-instance,applet,xdg-portal,multi-window --verbose --features tokio,winit,wayland,desktop,single-instance,applet,xdg-portal,multi-window
- name: Deploy documentation - name: Deploy documentation
uses: peaceiris/actions-gh-pages@v3 uses: peaceiris/actions-gh-pages@v4
with: with:
github_token: ${{ secrets.GITHUB_TOKEN }} github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./target/doc publish_dir: ./target/doc