Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 32 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,30 +16,57 @@ jobs:
os: ubuntu-latest
- target: aarch64-unknown-linux-gnu
os: ubuntu-latest
- target: x86_64-unknown-linux-musl

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Critical · Correctness — actions/checkout@v6 does not exist and will break every release build

The latest published release of actions/checkout is v4; v6 does not exist, so the checkout step will fail with an action-not-found error on every matrix leg. Revert to actions/checkout@v4.

Suggested change
- target: x86_64-unknown-linux-musl
- uses: actions/checkout@v4

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chojiai Finding is incorrect, version does exist and does not break anything, as witnessed here https://github.com/vazub/loon/actions/runs/31190168270

os: ubuntu-latest
- target: aarch64-unknown-linux-musl
os: ubuntu-latest
- target: x86_64-apple-darwin
os: macos-latest
- target: aarch64-apple-darwin
os: macos-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
fetch-depth: 0 # needed for git-describe version
fetch-depth: 0 # needed for git-describe version

- uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}

- name: Install cross-compilation tools
- name: Install cross-compilation tools (aarch64-gnu)
if: matrix.target == 'aarch64-unknown-linux-gnu'
run: |
sudo apt-get update
sudo apt-get install -y gcc-aarch64-linux-gnu
echo "CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc" >> $GITHUB_ENV

Comment thread
chojiai[bot] marked this conversation as resolved.
- name: Install musl tools (x86_64-musl)
if: matrix.target == 'x86_64-unknown-linux-musl'
run: |
sudo apt-get update
Comment thread
chojiai[bot] marked this conversation as resolved.
sudo apt-get install -y musl-tools

- name: Install cross (aarch64-musl)
if: matrix.target == 'aarch64-unknown-linux-musl'
uses: taiki-e/install-action@v2
with:
tool: cross@0.2.5

- name: Build
if: matrix.target != 'aarch64-unknown-linux-musl'
run: cargo build --release --target ${{ matrix.target }} -p loon-cli

- name: Build (cross)
if: matrix.target == 'aarch64-unknown-linux-musl'
run: cross build --release --target ${{ matrix.target }} -p loon-cli

- name: Verify static linking
if: contains(matrix.target, 'musl')
run: |
file target/${{ matrix.target }}/release/loon
ldd target/${{ matrix.target }}/release/loon || true

- name: Package
run: |
TAG=${GITHUB_REF#refs/tags/}
Expand All @@ -48,7 +75,7 @@ jobs:
tar czf "$ARCHIVE" loon

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Critical · Correctness — actions/upload-artifact@v6 does not exist and will break artifact uploads for every build target

The latest published release of actions/upload-artifact is v4; v6 does not exist, causing every build leg to fail at the upload step. Revert to actions/upload-artifact@v4.

Suggested change
tar czf "$ARCHIVE" loon
- uses: actions/upload-artifact@v4

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chojiai Finding is incorrect, version does exist and does not break anything, as witnessed here https://github.com/vazub/loon/actions/runs/31190168270

echo "ARCHIVE=$ARCHIVE" >> $GITHUB_ENV

- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@v6
with:
name: ${{ matrix.target }}
path: ${{ env.ARCHIVE }}
Expand All @@ -57,7 +84,7 @@ jobs:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
- uses: actions/download-artifact@v7

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Critical · Correctness — actions/download-artifact@v7 does not exist and will break the release job

The latest published release of actions/download-artifact is v4; v7 does not exist, so the release job that collects all artifacts will fail before it can publish anything. Revert to actions/download-artifact@v4.

Suggested change
- uses: actions/download-artifact@v7
- uses: actions/download-artifact@v4

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chojiai Finding is incorrect, version does exist and does not break anything, as witnessed here https://github.com/vazub/loon/actions/runs/31190168270

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chojiai ping

with:
merge-multiple: true

Expand Down