-
Notifications
You must be signed in to change notification settings - Fork 5
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
Build arm64 binaries #6
base: main
Are you sure you want to change the base?
Changes from all commits
56525a1
06bd7dc
af9fc42
6d93820
476ff79
8f6cf74
358f1ff
9c8732d
32e3a3a
2cadc0e
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 | ||||||
---|---|---|---|---|---|---|---|---|
|
@@ -2,86 +2,44 @@ name: Release | |||||||
|
||||||||
on: | ||||||||
push: | ||||||||
branches: [main] | ||||||||
tags: | ||||||||
- "v*" | ||||||||
pull_request: | ||||||||
branches: [main] | ||||||||
|
||||||||
jobs: | ||||||||
build: | ||||||||
strategy: | ||||||||
fail-fast: false | ||||||||
matrix: | ||||||||
include: | ||||||||
- target: x86_64-unknown-linux-gnu | ||||||||
os: ubuntu-latest | ||||||||
- target: aarch64-unknown-linux-gnu | ||||||||
os: ubuntu-latest | ||||||||
- target: x86_64-pc-windows-gnu | ||||||||
os: ubuntu-latest | ||||||||
extension: .exe | ||||||||
- target: x86_64-apple-darwin | ||||||||
# - target: x86_64-apple-darwin | ||||||||
# os: ubuntu-latest | ||||||||
- target: aarch64-apple-darwin | ||||||||
os: macos-latest | ||||||||
|
||||||||
runs-on: ${{ matrix.os }} | ||||||||
|
||||||||
steps: | ||||||||
- uses: actions/checkout@v2 | ||||||||
- uses: actions-rs/toolchain@v1 | ||||||||
with: | ||||||||
toolchain: stable | ||||||||
- uses: actions-rs/cargo@v1 | ||||||||
with: | ||||||||
command: build | ||||||||
args: --release --target=${{ matrix.target }} | ||||||||
use-cross: true | ||||||||
- uses: actions/upload-artifact@v1 | ||||||||
with: | ||||||||
name: build-${{ matrix.target }} | ||||||||
path: target/${{ matrix.target }}/release/split-test${{ matrix.extension }} | ||||||||
|
||||||||
create-release: | ||||||||
needs: [build] | ||||||||
runs-on: ubuntu-latest | ||||||||
steps: | ||||||||
- id: create-release | ||||||||
uses: actions/create-release@v1 | ||||||||
- uses: actions/checkout@v4 | ||||||||
- run: rustup update stable | ||||||||
- run: rustup default stable | ||||||||
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. According to the error message https://github.com/int128/split-test/actions/runs/8845858159/job/24290599577
perhaps this patch helps?
Suggested change
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. 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. @int128 Do you still have interests on this? At least I'd like to fix the CI if it has any trouble 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. Sorry, I forgot everything about this pull request. If needed, feel free to pick my changes. |
||||||||
- run: cargo install cross | ||||||||
- run: cross build --release --target=${{ matrix.target }} | ||||||||
- run: cp -v "$target_binary" "$target_asset" | ||||||||
env: | ||||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||||||||
with: | ||||||||
tag_name: ${{ github.ref }} | ||||||||
release_name: Release ${{ github.ref }} | ||||||||
draft: false | ||||||||
prerelease: false | ||||||||
- run: | | ||||||||
echo '${{ steps.create-release.outputs.upload_url }}' > release_upload_url.txt | ||||||||
- uses: actions/upload-artifact@v1 | ||||||||
with: | ||||||||
name: create-release | ||||||||
path: release_upload_url.txt | ||||||||
|
||||||||
upload-release: | ||||||||
strategy: | ||||||||
matrix: | ||||||||
target: | ||||||||
- x86_64-unknown-linux-gnu | ||||||||
- x86_64-apple-darwin | ||||||||
include: | ||||||||
- target: x86_64-pc-windows-gnu | ||||||||
extension: .exe | ||||||||
needs: [create-release] | ||||||||
runs-on: ubuntu-latest | ||||||||
steps: | ||||||||
- uses: actions/download-artifact@v1 | ||||||||
with: | ||||||||
name: create-release | ||||||||
- id: upload-url | ||||||||
run: | | ||||||||
echo "::set-output name=url::$(cat create-release/release_upload_url.txt)" | ||||||||
- uses: actions/download-artifact@v1 | ||||||||
with: | ||||||||
name: build-${{ matrix.target }} | ||||||||
- run: find . | ||||||||
- uses: actions/upload-release-asset@v1 | ||||||||
target_binary: target/${{ matrix.target }}/release/split-test${{ matrix.extension }} | ||||||||
target_asset: target/split-test-${{ matrix.target }}${{ matrix.extension }} | ||||||||
- if: github.ref_type == 'tag' | ||||||||
run: gh release upload "$GITHUB_REF_NAME" "$target_asset" | ||||||||
env: | ||||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||||||||
with: | ||||||||
upload_url: ${{ steps.upload-url.outputs.url }} | ||||||||
asset_path: build-${{ matrix.target }}/split-test${{ matrix.extension }} | ||||||||
asset_name: split-test-${{ matrix.target }}${{ matrix.extension }} | ||||||||
asset_content_type: application/octet-stream | ||||||||
GITHUB_TOKEN: ${{ github.token }} | ||||||||
target_asset: target/split-test-${{ matrix.target }}${{ matrix.extension }} |
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.
I thought this os should be
macos-latest
though, it seems you've tried bothhttps://github.com/int128/split-test/actions/runs/8845858159/job/24290599577