-
Notifications
You must be signed in to change notification settings - Fork 6
Provide pre-built musl targets #88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
ba0f198
bc93f8d
66f2772
8744835
9a83d0e
ed765ce
f1e3730
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -16,30 +16,57 @@ jobs: | |||||
| os: ubuntu-latest | ||||||
| - target: aarch64-unknown-linux-gnu | ||||||
| os: ubuntu-latest | ||||||
| - target: x86_64-unknown-linux-musl | ||||||
| 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 | ||||||
|
|
||||||
|
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 | ||||||
|
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/} | ||||||
|
|
@@ -48,7 +75,7 @@ jobs: | |||||
| tar czf "$ARCHIVE" loon | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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
Suggested change
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 }} | ||||||
|
|
@@ -57,7 +84,7 @@ jobs: | |||||
| needs: build | ||||||
| runs-on: ubuntu-latest | ||||||
| steps: | ||||||
| - uses: actions/download-artifact@v4 | ||||||
| - uses: actions/download-artifact@v7 | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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
Suggested change
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @chojiai ping |
||||||
| with: | ||||||
| merge-multiple: true | ||||||
|
|
||||||
|
|
||||||
There was a problem hiding this comment.
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/checkoutis v4; v6 does not exist, so the checkout step will fail with an action-not-found error on every matrix leg. Revert toactions/checkout@v4.There was a problem hiding this comment.
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