Skip to content

Commit

Permalink
Change to x86_64-unknown-linux-musl target
Browse files Browse the repository at this point in the history
  • Loading branch information
mbrav committed Apr 4, 2023
1 parent d3b2110 commit 9c0567c
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 5 deletions.
22 changes: 19 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Add stable x86_64-unknown-linux-musl target
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
target: x86_64-unknown-linux-musl
components: rustfmt, clippy

- name: Checkout
uses: actions/checkout@v3

Expand All @@ -32,20 +40,28 @@ jobs:
run: |
cargo clippy -- -W clippy::pedantic -W clippy::nursery -W clippy::unwrap_used
- name: Cargo Build Binary
- name: Cargo Build Binary (x86_64-unknown-linux-gnu)
run: |
cargo build --release
chmod +x target/release/${{ github.event.repository.name }}
- name: Optimize Binary with UPX
- name: Cargo Build Binary (x86_64-unknown-linux-musl)
run: |
cargo build --release --target x86_64-unknown-linux-musl
chmod +x target/x86_64-unknown-linux-musl/release/${{ github.event.repository.name }}
- name: Optimize Binaries with UPX
run: |
upx --best --lzma target/release/${{ github.event.repository.name }}
upx --best --lzma target/x86_64-unknown-linux-musl/release/${{ github.event.repository.name }}
- name: Package Binary
- name: Package Binaries
run: |
toolchain=$(rustup toolchain list | awk '{print $1;}')
tar_name="${{ github.event.repository.name }}_${{ github.ref_name }}-$toolchain"
tar -cvzf target/release/$tar_name.tar.gz target/release/${{ github.event.repository.name }}
tar_name="${{ github.event.repository.name }}_${{ github.ref_name }}-x86_64-unknown-linux-musl"
tar -cvzf target/release/$tar_name.tar.gz target/x86_64-unknown-linux-musl/release/${{ github.event.repository.name }}
- name: Release
uses: docker://antonyurchenko/git-release:v5
Expand Down
9 changes: 7 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,17 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.0.3] - 2023-04-04

### Changed

- Changed rustup target to `x86_64-unknown-linux-musl` instead of `x86_64-unknown-linux-gnu`

## [0.0.2] - 2023-04-04

### Added

- Added changelog


<!-- [0.0.3]: https://github.com/mbrav/git_raider/compare/0.0.2...0.0.3 -->
[0.0.3]: https://github.com/mbrav/git_raider/compare/0.0.2...0.0.3
[0.0.2]: https://github.com/mbrav/git_raider/releases/tag/0.0.2

0 comments on commit 9c0567c

Please sign in to comment.