aboutsummaryrefslogtreecommitdiffstats
path: root/.github/workflows
diff options
context:
space:
mode:
authorhar7an <99636919+har7an@users.noreply.github.com>2025-01-25 17:43:49 +0000
committerGitHub <noreply@github.com>2025-01-25 17:43:49 +0000
commit10df29ed113c5b5cf3887eaefc0fae9351080a75 (patch)
treea44f57fdebf9ab8c00e750b77cbc43fd814649a5 /.github/workflows
parentdocs(changelog): floating pane fixes (diff)
downloadsl0ppij-10df29ed113c5b5cf3887eaefc0fae9351080a75.tar.gz
sl0ppij-10df29ed113c5b5cf3887eaefc0fae9351080a75.tar.xz
sl0ppij-10df29ed113c5b5cf3887eaefc0fae9351080a75.zip
Update rust toolchain to 1.84 (#3945)
* chore: Remove deprecated `Makefile.toml` which really should have been deleted as part of #2012. This hasn't been updated for more than 2 years now and I don't expect anyone to still use this. Our build process is now managed by `cargo xtask`. * Cargo: Update the Rust toolchain to 1.84.0 from 1.75.0 which has been deprecated for a while now. Along with this change, the `wasm32-wasi` target is no longer available (see subsequent commit for additional info). * chore: Rename `wasm32-wasi` to `wasm32-wasip1` as required by the Rust project. The `wasm32-wasi` target name has been retired and will likely be reused at a later time, although to express an entirely different target (i.e. implementation of the WASI standard). For additional information, see: - https://blog.rust-lang.org/2024/04/09/updates-to-rusts-wasi-targets.html - https://blog.rust-lang.org/2024/09/05/Rust-1.81.0.html#wasi-01-target-naming-changed * chore: Drop `rust-analysis` component from the `rust-toolchain.toml` definition. This was added way back in 2021 via 8688569a, and while I'm not sure what it expressed back then, nowadays it refers to [Metadata for RLS][1], which apparently was an early language server implementation and has long since been replaced by *rust-analyzer*. We don't want to propose or enforce the use of a specific toolchain and in any case, setting this up properly is the job of a developers IDE/Editor. [1]: https://github.com/rust-lang/rustup/blob/1f06e3b31d444f3649dd51225a9d38362f7313e0/doc/user-guide/src/concepts/components.md#previous-components * chore: Adhere to type rename from `std::panic::PanicInfo` to `std::panic::PanicHookInfo`, which was introduced in Rust 1.81.0. For additional information, see: - https://releases.rs/docs/1.81.0/#compatibility-notes - https://github.com/rust-lang/rust/pull/115974/ * fix(utils/data): Adhere to expected case in match arm patterns, since the expression being matched against has been modified using `to_ascii_lowercase`. Hence, we cannot have upper case ASCII chars in the expressions (these arms were previously no-ops). * fix(utils): Derive `Hash` manually in `input/layout` since the `PartialEq` trait is also implemented manually. Previously the `Hash` impl wasn't consistent with the `Eq` impl, which can have weird effects when using these types in e.g. `HashMap`s or similar types. For additional information, see: - https://rust-lang.github.io/rust-clippy/master/index.html#derived_hash_with_manual_eq - https://doc.rust-lang.org/stable/std/hash/trait.Hash.html#hash-and-eq * fix(utils): Derive `Hash` manually in `pane_size` since the `PartialEq` trait is also implemented manually. Previously the `Hash` impl wasn't consistent with the `Eq` impl, which can have weird effects when using these types in e.g. `HashMap`s or similar types. For additional information, see: - https://rust-lang.github.io/rust-clippy/master/index.html#derived_hash_with_manual_eq - https://doc.rust-lang.org/stable/std/hash/trait.Hash.html#hash-and-eq * fix(server): Don't redeclare variables with their same names. Latest rust toolchains reject this code. * chore(actions): Use non-archived toolchain setup for the Rust toolchain. The previously used action has been archived over a year ago. The new one should also support reading our `rust-toolchain.toml`, so we no longer have to keep track of the toolchain in multiple places. * chore(actions): Add some space to YAML files to make them better visually parsable. * ci: Remove toolchain update Job since as far as I can tell, this isn't used any more. * ci: Fix invalid actions specification and only request an action without running other code. * CHANGELOG: Add PR #3945.
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/e2e.yml17
-rw-r--r--.github/workflows/release.yml38
-rw-r--r--.github/workflows/rust.yml21
-rw-r--r--.github/workflows/update-rust-toolchain.yml25
4 files changed, 40 insertions, 61 deletions
diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml
index 2d842326..77d8b16b 100644
--- a/.github/workflows/e2e.yml
+++ b/.github/workflows/e2e.yml
@@ -30,26 +30,29 @@ jobs:
options: -v ${{ github.workspace }}/target:/usr/src/zellij --name ssh
steps:
- uses: actions/checkout@v3
+
- name: Install Protoc
uses: arduino/setup-protoc@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- - name: Add WASM target
- run: rustup target add wasm32-wasi
+
- name: Install musl-tools
run: sudo apt-get install -y --no-install-recommends musl-tools
- - name: Add musl target
- run: rustup target add x86_64-unknown-linux-musl
- #run: cargo install --debug cargo-make
- - uses: Swatinem/rust-cache@v2
- # ensure the target folder exists, otherwise fixtures won't be in the right place
+
+ - name: Install Rust
+ uses: actions-rust-lang/setup-rust-toolchain@v1
+ with:
+ rustflags: ""
+
- name: Create target folder
run: mkdir -p ${{ github.workspace }}/target
# we copy this manually into the target folder instead of mounting it because
# github actions creates the service first, and if it has a mount that is part
# of your yet unchecked out code, you cannot checkout the code after the mount
+
- name: Copy fixtures folder to target
run: cp -r ${{ github.workspace }}/src/tests/fixtures ${{ github.workspace }}/target
+
- name: Restart ssh container
# we need to do this because otherwise the volume will not be mounted
# on the docker container, since it was created before the folder existed
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 8f8537da..260f5b98 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -53,28 +53,18 @@ jobs:
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- - name: Install Rust
- uses: actions-rs/toolchain@v1
- with:
- toolchain: ${{ matrix.rust }}
- profile: minimal
- override: true
- target: ${{ matrix.target }}
-
- - name: Add WASM target
- run: rustup target add wasm32-wasi
-
- name: Install musl-tools
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get install -y --no-install-recommends musl-tools
-
- # Workaround for <https://github.com/actions/virtual-environments/issues/2557>
- - name: Switch Xcode SDK
- if: runner.os == 'macos'
- run: |
- cat <<EOF >> "$GITHUB_ENV"
- SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk
- EOF
+
+ - name: Install Rust
+ uses: actions-rust-lang/setup-rust-toolchain@v1
+ with:
+ toolchain: ${{ matrix.rust }}
+ target: "${{ matrix.target }},wasm32-wasip1"
+ # Just to make sure the cache doesn't interfere with the build here
+ cache: false
+ rustflags: ""
- name: Build release binary
run: cargo xtask ci cross ${{ matrix.target }}
@@ -109,7 +99,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
- upload_url: ${{ needs.create-release.outputs.upload_url }}
+ upload_url: ${{ needs.create-release.outputs.upload_url }}
asset_path: ./target/${{ matrix.target }}/release/${{ steps.make-artifact.outputs.name }}
asset_name: zellij-${{matrix.target}}.tar.gz
asset_content_type: application/octet-stream
@@ -119,17 +109,17 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
- upload_url: ${{ needs.create-release.outputs.upload_url }}
+ upload_url: ${{ needs.create-release.outputs.upload_url }}
asset_path: ./target/${{ matrix.target }}/release/${{ steps.make-checksum.outputs.name }}
asset_name: zellij-${{matrix.target}}.sha256sum
asset_content_type: text/plain
create-release:
runs-on: ubuntu-latest
- outputs:
+ outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
steps:
- - name: create_release
+ - name: create_release
id: create_release
uses: actions/create-release@v1
env:
@@ -138,5 +128,5 @@ jobs:
tag_name: ${{ github.event_name == 'workflow_dispatch' && '' || github.ref }}
release_name: Release ${{ github.event_name == 'workflow_dispatch' && 'main' || github.ref }}
draft: ${{ github.event_name == 'workflow_dispatch' }}
- prerelease: false
+ prerelease: false
diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml
index 87109035..86f2a0f3 100644
--- a/.github/workflows/rust.yml
+++ b/.github/workflows/rust.yml
@@ -22,14 +22,17 @@ jobs:
steps:
- uses: actions/checkout@v3
+
- name: Install Protoc
uses: arduino/setup-protoc@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup toolchain
- run: rustup show
- - uses: Swatinem/rust-cache@v2
+ uses: actions-rust-lang/setup-rust-toolchain@v1
+ with:
+ rustflags: ""
+
- name: Build
run: cargo xtask build
@@ -45,13 +48,17 @@ jobs:
steps:
- uses: actions/checkout@v3
+
- name: Install Protoc
uses: arduino/setup-protoc@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
+
- name: Setup toolchain
- run: rustup show
- - uses: Swatinem/rust-cache@v2
+ uses: actions-rust-lang/setup-rust-toolchain@v1
+ with:
+ rustflags: ""
+
- name: Test
run: cargo xtask test
@@ -61,7 +68,11 @@ jobs:
steps:
- uses: actions/checkout@v3
+
- name: Setup toolchain
- run: rustup show
+ uses: actions-rust-lang/setup-rust-toolchain@v1
+ with:
+ rustflags: ""
+
- name: Check Format
run: cargo xtask format --check
diff --git a/.github/workflows/update-rust-toolchain.yml b/.github/workflows/update-rust-toolchain.yml
deleted file mode 100644
index 0fcb3662..00000000
--- a/.github/workflows/update-rust-toolchain.yml
+++ /dev/null
@@ -1,25 +0,0 @@
-name: update-rust-toolchain
-on:
- workflow_dispatch: # allows manual triggering
- schedule:
- - cron: '0 0 1 * *' # runs on the first of every month at 00:00
-
-jobs:
- update-rust-toolchain:
- name: "Update rust-toolchain"
- runs-on: ubuntu-latest
- timeout-minutes: 5
- steps:
- - name: Checkout repository
- uses: actions/checkout@v3
- - name: update rust toolchain
- id: urt
- uses: a-kenji/update-rust-toolchain@v1.1
- with:
- minor-version-delta: 2
- toolchain-path: './rust-toolchain.toml'
- token: ${{ secrets.GH_TOKEN_FOR_UPDATES }}
- pr-labels: |
- dependencies
- automated
- rust