chore(ci): add musl builds
This commit is contained in:
1 parent
d8c7c23c0b
commit
a2881a96fd
3 files changed
+72
-46
No files matched your search
@@ -41,17 +41,41 @@ jobs:
|
||||
- run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
|
||||
- name: Install musl-tools (Linux only)
|
||||
if: runner.os == 'Linux'
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y musl-tools
|
||||
|
||||
- name: Build Release
|
||||
shell: bash
|
||||
run: |
|
||||
cargo build --verbose --release
|
||||
if [ "${{ runner.os }}" == "Linux" ]; then
|
||||
if [ "${{ runner.arch }}" == "X64" ]; then
|
||||
TARGET="x86_64-unknown-linux-musl"
|
||||
elif [ "${{ runner.arch }}" == "ARM64" ]; then
|
||||
TARGET="aarch64-unknown-linux-musl"
|
||||
fi
|
||||
rustup target add "$TARGET"
|
||||
cargo build --verbose --release --target "$TARGET"
|
||||
fi
|
||||
|
||||
- name: Prepare artifacts
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir -p dist
|
||||
EXT=""
|
||||
if [ "${{ runner.os }}" == "Windows" ]; then EXT=".exe"; fi
|
||||
cp "target/release/pumpkin$EXT" "dist/pumpkin-${{ runner.arch }}-${{ runner.os }}$EXT"
|
||||
if [ "${{ runner.os }}" == "Linux" ]; then
|
||||
if [ "${{ runner.arch }}" == "X64" ]; then
|
||||
TARGET="x86_64-unknown-linux-musl"
|
||||
elif [ "${{ runner.arch }}" == "ARM64" ]; then
|
||||
TARGET="aarch64-unknown-linux-musl"
|
||||
fi
|
||||
cp "target/$TARGET/release/pumpkin" "dist/pumpkin-${{ runner.arch }}-${{ runner.os }}-musl"
|
||||
fi
|
||||
|
||||
- name: Upload unsigned executable for SignPath (Windows only)
|
||||
if: runner.os == 'Windows'
|
||||
|
||||
Reference in new issue
Block a user