Skip to content

Commit 03b03a5

Browse files
committed
Update and rename buildrelease.yml to build_utils.yml, added linux aarch64 build, switched to universal2 macos target
1 parent a8be9a8 commit 03b03a5

1 file changed

Lines changed: 48 additions & 18 deletions

File tree

Lines changed: 48 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -17,28 +17,46 @@ jobs:
1717
steps:
1818
- name: '📄 Checkout'
1919
uses: actions/checkout@v4
20-
- name: 'Set up Rust environment'
20+
21+
- name: '⚙️ Set up Rust environment'
2122
uses: dtolnay/rust-toolchain@master
2223
with:
2324
toolchain: stable
24-
targets: x86_64-pc-windows-gnu, x86_64-unknown-linux-gnu
25-
- name: 'Cache Rust dependencies'
25+
targets: x86_64-pc-windows-gnu, i686-pc-windows-gnu, x86_64-unknown-linux-gnu, aarch64-unknown-linux-gnu
26+
27+
- name: '🔽 Cache Rust dependencies'
2628
uses: actions/cache@v4
2729
with:
2830
path: target
2931
key: ${{ runner.OS }}-build-${{ hashFiles('**/Cargo.lock') }}
3032
restore-keys: |
3133
${{ runner.OS }}-build-
34+
35+
- name: '🔄 Set up additional requirements'
36+
run: |
37+
sudo apt-get install -y gcc-mingw-w64
38+
pip install cargo-zigbuild
39+
3240
- name: '📦 Package Windows x86_64'
3341
run: |
3442
cd ${{github.workspace}}
35-
sudo apt-get install -y gcc-mingw-w64
3643
cargo build --profile production --target x86_64-pc-windows-gnu $BINARIES
3744
zip -j lbee-utils_Windows-x86_64.zip target/x86_64-pc-windows-gnu/production/czutil.exe target/x86_64-pc-windows-gnu/production/pakutil.exe
3845
gh release upload ${{ github.ref_name }} lbee-utils_Windows-x86_64.zip
3946
env:
4047
GITHUB_TOKEN: ${{ github.TOKEN }}
4148
shell: bash
49+
50+
- name: '📦 Package Windows i686'
51+
run: |
52+
cd ${{github.workspace}}
53+
cargo build --profile production --target i686-pc-windows-gnu $BINARIES
54+
zip -j lbee-utils_Windows-x86.zip target/i686-pc-windows-gnu/production/czutil.exe target/i686-pc-windows-gnu/production/pakutil.exe
55+
gh release upload ${{ github.ref_name }} lbee-utils_Windows-x86.zip
56+
env:
57+
GITHUB_TOKEN: ${{ github.TOKEN }}
58+
shell: bash
59+
4260
- name: '📦 Package Linux x86_64'
4361
run: |
4462
cd ${{github.workspace}}
@@ -48,39 +66,51 @@ jobs:
4866
env:
4967
GITHUB_TOKEN: ${{ github.TOKEN }}
5068
shell: bash
69+
70+
- name: '📦 Package Linux aarch64'
71+
run: |
72+
cd ${{github.workspace}}
73+
cargo zigbuild --profile production --target aarch64-unknown-linux-gnu $BINARIES
74+
zip -j lbee-utils_Linux-Arm64.zip target/aarch64-unknown-linux-gnu/production/czutil target/aarch64-unknown-linux-gnu/production/pakutil
75+
gh release upload ${{ github.ref_name }} lbee-utils_Linux-Arm64.zip
76+
env:
77+
GITHUB_TOKEN: ${{ github.TOKEN }}
78+
shell: bash
79+
5180
build-mac:
5281
name: Build binaries for MacOS
5382
runs-on: macos-14
5483
steps:
5584
- name: '📄 Checkout'
5685
uses: actions/checkout@v4
57-
- name: 'Set up Rust environment'
86+
87+
- name: '⚙️ Set up Rust environment'
5888
uses: dtolnay/rust-toolchain@master
5989
with:
6090
toolchain: stable
6191
targets: x86_64-apple-darwin, aarch64-apple-darwin
62-
- name: 'Cache Rust dependencies'
92+
93+
- name: '🔽 Cache Rust dependencies'
6394
uses: actions/cache@v4
6495
with:
6596
path: target
6697
key: ${{ runner.OS }}-build-${{ hashFiles('**/Cargo.lock') }}
6798
restore-keys: |
6899
${{ runner.OS }}-build-
69-
- name: '📦 Package MacOS x86_64'
100+
101+
- name: '🔄 Set up additional requirements'
70102
run: |
71-
cd ${{github.workspace}}
72-
cargo build --profile production --target x86_64-apple-darwin $BINARIES
73-
zip -j lbee-utils_Mac-x86_64.zip target/x86_64-apple-darwin/production/czutil target/x86_64-apple-darwin/production/pakutil
74-
gh release upload ${{ github.ref_name }} lbee-utils_Mac-x86_64.zip
75-
env:
76-
GITHUB_TOKEN: ${{ github.TOKEN }}
77-
shell: bash
78-
- name: '📦 Package MacOS Arm'
103+
brew install zig
104+
cargo install --locked cargo-zigbuild
105+
106+
- name: '📦 Package MacOS Universal2'
79107
run: |
80108
cd ${{github.workspace}}
81-
cargo build --profile production --target aarch64-apple-darwin $BINARIES
82-
zip -j lbee-utils_Mac-Arm.zip target/aarch64-apple-darwin/production/czutil target/aarch64-apple-darwin/production/pakutil
83-
gh release upload ${{ github.ref_name }} lbee-utils_Mac-Arm.zip
109+
cargo zigbuild --manifest-path "cz/Cargo.toml" --profile production --target universal2-apple-darwin
110+
cargo zigbuild --manifest-path "luca_pak/Cargo.toml" --profile production --target universal2-apple-darwin
111+
cargo zigbuild --manifest-path "utils/Cargo.toml" --profile production --target universal2-apple-darwin $BINARIES
112+
zip -j lbee-utils_Mac-Universal.zip target/universal2-apple-darwin/production/czutil target/universal2-apple-darwin/production/pakutil
113+
gh release upload ${{ github.ref_name }} lbee-utils_Mac-Universal.zip
84114
env:
85115
GITHUB_TOKEN: ${{ github.TOKEN }}
86116
shell: bash

0 commit comments

Comments
 (0)