Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to '.github/workflows/release.yaml')
-rw-r--r--.github/workflows/release.yaml59
1 files changed, 27 insertions, 32 deletions
diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml
index fe090267dc..c8e6de72ce 100644
--- a/.github/workflows/release.yaml
+++ b/.github/workflows/release.yaml
@@ -17,12 +17,12 @@ env:
RUSTUP_MAX_RETRIES: 10
FETCH_DEPTH: 0 # pull in the tags for the version string
MACOSX_DEPLOYMENT_TARGET: 13.0
- CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
- CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABIHF_LINKER: arm-linux-gnueabihf-gcc
+ ZIG_VERSION: 0.13.0
+ ZIGBUILD_VERSION: 0.19.8
jobs:
dist:
- if: ${{ github.repository == 'rust-lang/rust-analyzer' || github.event.action == 'workflow_dispatch' }}
+ if: ${{ github.repository == 'rust-lang/rust-analyzer' || github.event_name == 'workflow_dispatch' }}
strategy:
matrix:
include:
@@ -36,13 +36,15 @@ jobs:
code-target: win32-arm64
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
+ zig_target: x86_64-unknown-linux-gnu.2.28
code-target: linux-x64
- container: rockylinux:8
- os: ubuntu-latest
target: aarch64-unknown-linux-gnu
+ zig_target: aarch64-unknown-linux-gnu.2.28
code-target: linux-arm64
- os: ubuntu-latest
target: arm-unknown-linux-gnueabihf
+ zig_target: arm-unknown-linux-gnueabihf.2.28
code-target: linux-armhf
- os: macos-13
target: x86_64-apple-darwin
@@ -64,40 +66,33 @@ jobs:
with:
fetch-depth: ${{ env.FETCH_DEPTH }}
- - name: Install toolchain dependencies
- if: matrix.container == 'rockylinux:8'
- shell: bash
- run: |
- dnf install -y gcc
- curl --proto '=https' --tlsv1.2 --retry 10 --retry-connrefused -fsSL "https://sh.rustup.rs" | sh -s -- --profile minimal --default-toolchain none -y
- echo "${CARGO_HOME:-$HOME/.cargo}/bin" >> $GITHUB_PATH
+ - name: Install Node.js toolchain
+ uses: actions/setup-node@v4
+ with:
+ node-version: 22
- name: Install Rust toolchain
run: |
rustup update --no-self-update stable
- rustup target add ${{ matrix.target }}
rustup component add rust-src
+ rustup target add ${{ matrix.target }}
- - name: Install Node.js
- uses: actions/setup-node@v4
- with:
- node-version: 18
-
- - name: Update apt repositories
- if: matrix.target == 'aarch64-unknown-linux-gnu' || matrix.target == 'arm-unknown-linux-gnueabihf'
- run: sudo apt-get update
-
- - name: Install AArch64 target toolchain
- if: matrix.target == 'aarch64-unknown-linux-gnu'
- run: sudo apt-get install gcc-aarch64-linux-gnu
-
- - name: Install ARM target toolchain
- if: matrix.target == 'arm-unknown-linux-gnueabihf'
- run: sudo apt-get install gcc-arm-linux-gnueabihf
+ - name: Install Zig toolchain
+ if: ${{ matrix.zig_target }}
+ run: |
+ which cargo
+ curl -L "https://ziglang.org/download/${ZIG_VERSION}/zig-linux-$(uname -m)-${ZIG_VERSION}.tar.xz" | sudo tar JxC /usr/local
+ sudo ln -s "/usr/local/zig-linux-$(uname -m)-${ZIG_VERSION}/zig" /usr/local/bin/zig
+ curl -L "https://github.com/rust-cross/cargo-zigbuild/releases/download/v${ZIGBUILD_VERSION}/cargo-zigbuild-v${ZIGBUILD_VERSION}.x86_64-unknown-linux-musl.tar.gz" | tar zxC ~/.cargo/bin
- - name: Dist
+ - name: Dist (plain)
+ if: ${{ !matrix.zig_target }}
run: cargo xtask dist --client-patch-version ${{ github.run_number }}
+ - name: Dist (using zigbuild)
+ if: ${{ matrix.zig_target }}
+ run: RA_TARGET=${{ matrix.zig_target}} cargo xtask dist --client-patch-version ${{ github.run_number }} --zig
+
- run: npm ci
working-directory: editors/code
@@ -139,7 +134,7 @@ jobs:
path: ./dist
dist-x86_64-unknown-linux-musl:
- if: ${{ github.repository == 'rust-lang/rust-analyzer' || github.event.action == 'workflow_dispatch' }}
+ if: ${{ github.repository == 'rust-lang/rust-analyzer' || github.event_name == 'workflow_dispatch' }}
name: dist (x86_64-unknown-linux-musl)
runs-on: ubuntu-latest
env:
@@ -185,7 +180,7 @@ jobs:
path: ./dist
publish:
- if: ${{ github.repository == 'rust-lang/rust-analyzer' || github.event.action == 'workflow_dispatch' }}
+ if: ${{ github.repository == 'rust-lang/rust-analyzer' || github.event_name == 'workflow_dispatch' }}
name: publish
runs-on: ubuntu-latest
needs: ["dist", "dist-x86_64-unknown-linux-musl"]
@@ -193,7 +188,7 @@ jobs:
- name: Install Nodejs
uses: actions/setup-node@v4
with:
- node-version: 20
+ node-version: 22
- run: echo "TAG=$(date --iso -u)" >> $GITHUB_ENV
if: github.ref == 'refs/heads/release'