Remove MUSL, build statically via flags

This commit is contained in:
Matthew Esposito 2023-06-03 16:12:48 -04:00
parent 510d967777
commit 221260c282
No known key found for this signature in database

View file

@ -30,11 +30,10 @@ jobs:
uses: dtolnay/rust-toolchain@stable uses: dtolnay/rust-toolchain@stable
with: with:
toolchain: stable toolchain: stable
targets: "x86_64-unknown-linux-gnu,x86_64-unknown-linux-musl"
# Building actions # Building actions
- name: Build - name: Build
run: cargo build --release run: RUSTFLAGS='-C target-feature=+crt-static' cargo build --release
- name: Calculate SHA512 checksum - name: Calculate SHA512 checksum
run: sha512sum target/release/libreddit > libreddit.sha512 run: sha512sum target/release/libreddit > libreddit.sha512
@ -42,27 +41,14 @@ jobs:
- name: Calculate SHA256 checksum - name: Calculate SHA256 checksum
run: sha256sum target/release/libreddit > libreddit.sha256 run: sha256sum target/release/libreddit > libreddit.sha256
- name: Build MUSL
run: cargo build --release --target x86_64-unknown-linux-musl
- name: Calculate MUSL SHA512 checksum
run: sha512sum target/x86_64-unknown-linux-musl/release/libreddit > libreddit-musl.sha512
- name: Calculate MUSL SHA256 checksum
run: sha256sum target/x86_64-unknown-linux-musl/release/libreddit > libreddit-musl.sha256
- name: Move MUSL binary
run: mv target/x86_64-unknown-linux-musl/release/libreddit target/x86_64-unknown-linux-musl/release/libreddit-musl
- uses: actions/upload-artifact@v3 - uses: actions/upload-artifact@v3
name: Upload a Build Artifact name: Upload a Build Artifact
with: with:
name: libreddit name: libreddit
path: | path: |
target/release/libreddit target/release/libreddit
target/x86_64-unknown-linux-musl/release/libreddit-musl libreddit.sha512
*.sha512 libreddit.sha256
*.sha256
- name: Versions - name: Versions
id: version id: version
@ -85,9 +71,6 @@ jobs:
target/release/libreddit target/release/libreddit
libreddit.sha512 libreddit.sha512
libreddit.sha256 libreddit.sha256
target/x86_64-unknown-linux-musl/release/libreddit-musl
libreddit-musl.sha512
libreddit-musl.sha256
body: | body: |
- ${{ github.event.head_commit.message }} ${{ github.sha }} - ${{ github.event.head_commit.message }} ${{ github.sha }}
generate_release_notes: true generate_release_notes: true