From 1dd9a987f208485ee7095f8526767a40aaf370e7 Mon Sep 17 00:00:00 2001 From: Chance Date: Thu, 10 Apr 2025 16:29:33 -0400 Subject: [PATCH] fix: workflow fails due to long file names --- .forgejo/workflows/rust.yml | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/.forgejo/workflows/rust.yml b/.forgejo/workflows/rust.yml index b536c34..9975e63 100644 --- a/.forgejo/workflows/rust.yml +++ b/.forgejo/workflows/rust.yml @@ -6,6 +6,7 @@ env: CARGO_TERM_COLOR: always jobs: build: + name: Build ${{ matrix.target }} strategy: fail-fast: false matrix: @@ -59,19 +60,24 @@ jobs: - name: 📥 Clone repository uses: actions/checkout@v4 - - name: 🛠️ Install dependencies + - name: 🐧 Install Linux dependencies + if: contains(matrix.target, 'linux') run: | apt-get update - # Install platform-specific dependencies - if [[ "${{ matrix.target }}" == *"linux"* ]]; then - apt-get install -y ${{ matrix.deps }} - elif [[ "${{ matrix.target }}" == *"windows"* ]]; then - apt-get install -y ${{ matrix.deps }} - elif [[ "${{ matrix.target }}" == *"apple-darwin"* ]]; then - wget https://ziglang.org/builds/zig-linux-x86_64-0.11.0.tar.xz - tar xf zig-linux-x86_64-0.11.0.tar.xz - echo "$(pwd)/zig-linux-x86_64-0.11.0" >> $GITHUB_PATH - fi + apt-get install -y ${{ matrix.deps }} + + - name: 🪟 Install Windows dependencies + if: contains(matrix.target, 'windows') + run: | + apt-get update + apt-get install -y ${{ matrix.deps }} + + - name: 🍎 Install macOS dependencies (Zig) + if: contains(matrix.target, 'apple-darwin') + run: | + wget https://ziglang.org/builds/zig-linux-x86_64-0.11.0.tar.xz + tar xf zig-linux-x86_64-0.11.0.tar.xz + echo "$(pwd)/zig-linux-x86_64-0.11.0" >> $GITHUB_PATH - name: 🔧 Install Rust uses: https://github.com/actions-rs/toolchain@v1 @@ -81,7 +87,7 @@ jobs: target: ${{ matrix.target }} profile: minimal - - name: 🔧 Install cargo-zigbuild (macOS) + - name: 🔧 Install cargo-zigbuild if: contains(matrix.target, 'apple-darwin') run: cargo install cargo-zigbuild