Skip to content

Commit

Permalink
添加aarch64 action
Browse files Browse the repository at this point in the history
  • Loading branch information
xml committed Apr 15, 2024
1 parent e7fead9 commit 6a3db53
Showing 1 changed file with 11 additions and 13 deletions.
24 changes: 11 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,28 +14,25 @@ jobs:
steps:
- name: Checkout source
uses: actions/checkout@v2

- name: Prepare Build
run: |
wget http://musl.cc/aarch64-linux-musl-cross.tgz -O ${GITHUB_WORKSPACE}/aarch64-linux-musl-cross.tgz
tar xvzf ${GITHUB_WORKSPACE}/aarch64-linux-musl-cross.tgz --C ${GITHUB_WORKSPACE}/
- name: Build
run: |
export PATH=${GITHUB_WORKSPACE}/aarch64-linux-musl-cross/bin:${PATH}
rustup target add x86_64-unknown-linux-musl
rustup target add aarch64-unknown-linux-musl
cargo build --release --target x86_64-unknown-linux-musl
- name: Get previous commit
uses: actions/github-script@v4
with:
script: |
const commits = await github.repos.listCommits({
owner: context.repo.owner,
repo: context.repo.repo,
per_page: 2
});
const previousCommit = commits.data[1].sha;
console.log(previousCommit);
cargo build --release --target aarch64-unknown-linux-musl --config='target.aarch64-unknown-linux-musl.linker="aarch64-linux-musl-ld"'
- name: Zip the Build
run: |
ls target/release
tar cvzf system-monitor_musl_amd64.tar.gz -C ./target/x86_64-unknown-linux-musl/release system-monitor
tar cvzf system-monitor_musl_arm64.tar.gz -C ./target/aarch64-unknown-linux-musl/release system-monitor
- name: Create Release
uses: softprops/action-gh-release@v2
Expand All @@ -47,4 +44,5 @@ jobs:
draft: false
prerelease: false
files: |
system-monitor_musl_amd64.tar.gz
system-monitor_musl_amd64.tar.gz
system-monitor_musl_arm64.tar.gz

0 comments on commit 6a3db53

Please sign in to comment.