Skip to content

Commit 5034c5f

Browse files
committed
add Linux build with musl
1 parent 064d09a commit 5034c5f

File tree

2 files changed

+49
-16
lines changed

2 files changed

+49
-16
lines changed

.github/workflows/release.yml

Lines changed: 48 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,52 @@ jobs:
1717
- name: Install Mingw for Windows cross-compilation
1818
run: sudo apt-get install -y gcc-mingw-w64-x86-64
1919

20+
- name: Install musl
21+
run: sudo apt-get install -y musl-dev musl-tools
22+
2023
- name: Install latest Rust stable
2124
uses: dtolnay/rust-toolchain@stable
2225
with:
2326
toolchain: stable
24-
targets: x86_64-pc-windows-gnu
27+
targets: x86_64-pc-windows-gnu,x86_64-unknown-linux-musl
2528

2629
- name: Run tests
2730
run: cargo test --release --verbose
2831

29-
- name: Build
32+
- name: Build for Windows
3033
run: cargo build --release --verbose --target=x86_64-pc-windows-gnu
3134

35+
- name: Build for Linux with musl
36+
run: cargo build --release --verbose --target=x86_64-unknown-linux-musl
37+
38+
- name: Prepare Release asset for Windows
39+
env:
40+
TARGET_EXE: ./target/x86_64-pc-windows-gnu/release/customasm.exe
41+
run: |
42+
mkdir ./pkg
43+
cp $TARGET_EXE ./pkg/customasm.exe
44+
cp -r ./examples ./pkg/examples
45+
cp ./README_PKG.txt ./pkg/README.txt
46+
cd ./pkg
47+
zip -r pkg.zip .
48+
cd ..
49+
mv ./pkg/pkg.zip ./pkg_win64.zip
50+
rm -rf ./pkg
51+
52+
- name: Prepare Release asset for Linux with musl
53+
env:
54+
TARGET_EXE: ./target/x86_64-unknown-linux-musl/release/customasm
55+
run: |
56+
mkdir ./pkg
57+
cp $TARGET_EXE ./pkg/customasm
58+
cp -r ./examples ./pkg/examples
59+
cp ./README_PKG.txt ./pkg/README.txt
60+
cd ./pkg
61+
zip -r pkg.zip .
62+
cd ..
63+
mv ./pkg/pkg.zip ./pkg_linux_musl.zip
64+
rm -rf ./pkg
65+
3266
- name: Create Release
3367
id: create_release
3468
uses: actions/create-release@latest
@@ -37,27 +71,26 @@ jobs:
3771
with:
3872
tag_name: ${{ github.ref }}
3973
release_name: ${{ github.ref }}
40-
body: Here's a new release! [Check out the changelog!](https://github.com/hlorenzi/customasm/wiki/Changelog)
74+
body: Here's a new automated release! [Check out the changelog!](https://github.com/hlorenzi/customasm/wiki/Changelog)
4175
draft: false
4276
prerelease: false
4377

44-
- name: Prepare Release asset
78+
- name: Upload Release asset for Windows
79+
uses: actions/upload-release-asset@v1
4580
env:
46-
TARGET_EXE: ./target/x86_64-pc-windows-gnu/release/customasm.exe
47-
run: |
48-
mkdir ./pkg
49-
mv $TARGET_EXE ./pkg/customasm.exe
50-
mv ./examples ./pkg/examples
51-
mv ./README_PKG.txt ./pkg/README.txt
52-
cd ./pkg
53-
zip -r pkg.zip .
81+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
82+
with:
83+
upload_url: ${{ steps.create_release.outputs.upload_url }}
84+
asset_path: ./pkg_win64.zip
85+
asset_name: customasm_${{github.ref_name}}_win64.zip
86+
asset_content_type: application/zip
5487

55-
- name: Upload Release asset
88+
- name: Upload Release asset for Linux with musl
5689
uses: actions/upload-release-asset@v1
5790
env:
5891
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5992
with:
6093
upload_url: ${{ steps.create_release.outputs.upload_url }}
61-
asset_path: ./pkg/pkg.zip
62-
asset_name: customasm_win64.zip
94+
asset_path: ./pkg_linux_musl.zip
95+
asset_name: customasm_${{github.ref_name}}_linux_musl.zip
6396
asset_content_type: application/zip

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "customasm"
3-
version = "0.13.11"
3+
version = "0.13.12"
44
edition = "2024"
55
authors = ["hlorenzi <https://hlorenzi.com>"]
66
description = "An assembler for custom, user-defined instruction sets!"

0 commit comments

Comments
 (0)