Skip to content
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

Add x86_64-unknown-linux-musl compilation platform to GitHub Actions #28

Merged
merged 1 commit into from
Oct 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 27 additions & 3 deletions .github/compilation-guide/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,31 @@ jobs:
choco install nasm -y
shell: cmd

- name: Build
- name: Build on Windows/macOS
if: runner.os != 'Linux'
run: cargo build --release

- name: Archive build artifacts on Linux/macOS
if: runner.os == 'Linux' || runner.os == 'macOS'
- name: Build on Linux
if: runner.os == 'Linux'
run: |
cargo build --release
docker pull messense/rust-musl-cross:x86_64-musl
docker run --rm -v "$(pwd)":/home/rust/src messense/rust-musl-cross:x86_64-musl cargo build --release

- name: Archive build artifacts on macOS
if: runner.os == 'macOS'
run: |
cd target/release
zip -r ../../build-${{ runner.os }}-${{ matrix.architecture }}.zip *
working-directory: ${{ github.workspace }}

- name: Archive build artifacts on Linux
if: runner.os == 'Linux'
run: |
cd target/release
zip -r ../../build-${{ runner.os }}-${{ matrix.architecture }}.zip *
cd ../x86_64-unknown-linux-musl/release
zip -r ../../../build-x86_64-unknown-linux-musl.zip *
working-directory: ${{ github.workspace }}

- name: Archive build artifacts on Windows
Expand All @@ -66,3 +83,10 @@ jobs:
with:
name: build-${{ matrix.os }}-${{ matrix.architecture }}
path: build-${{ runner.os }}-${{ matrix.architecture }}.zip

- name: Upload x86_64-unknown-linux-musl Linux build artifact
if: runner.os == 'Linux'
uses: actions/upload-artifact@v4
with:
name: build-x86_64-unknown-linux-musl
path: build-x86_64-unknown-linux-musl.zip
Loading