Skip to content

Commit

Permalink
ci: cross compile on linux aarch64
Browse files Browse the repository at this point in the history
  • Loading branch information
justjavac committed Nov 15, 2024
1 parent 47c4f37 commit 4486545
Showing 1 changed file with 27 additions and 4 deletions.
31 changes: 27 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,20 @@ jobs:
- name: Build release
run: cargo build --release --locked

- name: Run cargo test
run: cargo test --locked

- name: Build release(aarch64-apple-darwin)
if: startsWith(matrix.os, 'macOS')
run: |
rustup target add aarch64-apple-darwin
cargo build --release --target aarch64-apple-darwin --locked
- name: Run cargo test
run: cargo test --locked
- name: Build release(aarch64-unknown-linux-gnu)
if: startsWith(matrix.os, 'ubuntu')
run: |
rustup target add aarch64-unknown-linux-gnu
cargo build --release --target aarch64-unknown-linux-gnu --locked
- name: Test install from local file (bash)
if: startsWith(matrix.os, 'ubuntu') || startsWith(matrix.os, 'macOS')
Expand All @@ -85,12 +91,17 @@ jobs:
run: zip -r dvm-x86_64-unknown-linux-gnu.zip dvm
working-directory: target/release

- name: Pre-release (linux-aarch64)
if: startsWith(matrix.os, 'ubuntu')
run: zip -r dvm-aarch64-unknown-linux-gnu.zip dvm
working-directory: target/aarch64-unknown-linux-gnu/release

- name: Pre-release (mac)
if: startsWith(matrix.os, 'macOS')
run: zip -r dvm-x86_64-apple-darwin.zip dvm
working-directory: target/release

- name: Pre-release (mac-aarch64)
- name: Pre-release (aarch64-apple-darwin)
if: startsWith(matrix.os, 'macOS')
run: zip -r dvm-aarch64-apple-darwin.zip dvm
working-directory: target/aarch64-apple-darwin/release
Expand All @@ -113,6 +124,7 @@ jobs:
target/release/dvm-x86_64-unknown-linux-gnu.zip
target/release/dvm-x86_64-apple-darwin.zip
target/aarch64-apple-darwin/release/dvm-aarch64-apple-darwin.zip
target/aarch64-unknown-linux-gnu/release/dvm-aarch64-unknown-linux-gnu.zip
draft: true

- name: Release DVM
Expand All @@ -128,7 +140,7 @@ jobs:
target/release/dvm-x86_64-unknown-linux-gnu.zip
target/release/dvm-x86_64-apple-darwin.zip
- name: Release DVM(aarch64)
- name: Release DVM(aarch64-apple-darwin)
uses: justjavac/action-dvm-release@v1
if: |
startsWith(github.repository, 'justjavac') &&
Expand All @@ -139,6 +151,17 @@ jobs:
files: |
target/aarch64-apple-darwin/release/dvm-aarch64-apple-darwin.zip
- name: Release DVM(aarch64-unknown-linux-gnu)
uses: justjavac/action-dvm-release@v1
if: |
startsWith(github.repository, 'justjavac') &&
startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.PERSONAL_TOKEN }}
with:
files: |
target/aarch64-unknown-linux-gnu/release/dvm-aarch64-unknown-linux-gnu.zip
- name: Publish
if: |
startsWith(matrix.os, 'ubuntu') &&
Expand Down

0 comments on commit 4486545

Please sign in to comment.