Compare commits

...

1 commit

View file

@ -17,28 +17,36 @@ jobs:
steps: steps:
- name: '📄 Checkout' - name: '📄 Checkout'
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: 'Set up Rust environment'
- name: '⚙️ Set up Rust environment'
uses: dtolnay/rust-toolchain@master uses: dtolnay/rust-toolchain@master
with: with:
toolchain: stable toolchain: stable
targets: x86_64-pc-windows-gnu, x86_64-unknown-linux-gnu targets: x86_64-pc-windows-gnu, x86_64-unknown-linux-gnu, aarch64-unknown-linux-gnu
- name: 'Cache Rust dependencies'
- name: '🔽 Cache Rust dependencies'
uses: actions/cache@v4 uses: actions/cache@v4
with: with:
path: target path: target
key: ${{ runner.OS }}-build-${{ hashFiles('**/Cargo.lock') }} key: ${{ runner.OS }}-build-${{ hashFiles('**/Cargo.lock') }}
restore-keys: | restore-keys: |
${{ runner.OS }}-build- ${{ runner.OS }}-build-
- name: '🔄 Set up additional requirements'
run: |
sudo apt-get install -y gcc-mingw-w64
pip install cargo-zigbuild
- name: '📦 Package Windows x86_64' - name: '📦 Package Windows x86_64'
run: | run: |
cd ${{github.workspace}} cd ${{github.workspace}}
sudo apt-get install -y gcc-mingw-w64
cargo build --profile production --target x86_64-pc-windows-gnu $BINARIES cargo build --profile production --target x86_64-pc-windows-gnu $BINARIES
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 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
gh release upload ${{ github.ref_name }} lbee-utils_Windows-x86_64.zip gh release upload ${{ github.ref_name }} lbee-utils_Windows-x86_64.zip
env: env:
GITHUB_TOKEN: ${{ github.TOKEN }} GITHUB_TOKEN: ${{ github.TOKEN }}
shell: bash shell: bash
- name: '📦 Package Linux x86_64' - name: '📦 Package Linux x86_64'
run: | run: |
cd ${{github.workspace}} cd ${{github.workspace}}
@ -48,39 +56,48 @@ jobs:
env: env:
GITHUB_TOKEN: ${{ github.TOKEN }} GITHUB_TOKEN: ${{ github.TOKEN }}
shell: bash shell: bash
- name: '📦 Package Linux Arm'
run: |
cd ${{github.workspace}}
cargo zigbuild --profile production --target aarch64-unknown-linux-gnu $BINARIES
zip -j lbee-utils_Linux-Arm.zip target/aarch64-unknown-linux-gnu/production/czutil target/aarch64-unknown-linux-gnu/production/pakutil
gh release upload ${{ github.ref_name }} lbee-utils_Linux-Arm.zip
env:
GITHUB_TOKEN: ${{ github.TOKEN }}
shell: bash
build-mac: build-mac:
name: Build binaries for MacOS name: Build binaries for MacOS
runs-on: macos-14 runs-on: macos-14
steps: steps:
- name: '📄 Checkout' - name: '📄 Checkout'
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: 'Set up Rust environment'
- name: '⚙️ Set up Rust environment'
uses: dtolnay/rust-toolchain@master uses: dtolnay/rust-toolchain@master
with: with:
toolchain: stable toolchain: stable
targets: x86_64-apple-darwin, aarch64-apple-darwin targets: x86_64-apple-darwin, aarch64-apple-darwin
- name: 'Cache Rust dependencies'
- name: '🔽 Cache Rust dependencies'
uses: actions/cache@v4 uses: actions/cache@v4
with: with:
path: target path: target
key: ${{ runner.OS }}-build-${{ hashFiles('**/Cargo.lock') }} key: ${{ runner.OS }}-build-${{ hashFiles('**/Cargo.lock') }}
restore-keys: | restore-keys: |
${{ runner.OS }}-build- ${{ runner.OS }}-build-
- name: '📦 Package MacOS x86_64'
- name: '🔄 Set up additional requirements'
run: |
pip install cargo-zigbuild
- name: '📦 Package MacOS Universal2'
run: | run: |
cd ${{github.workspace}} cd ${{github.workspace}}
cargo build --profile production --target x86_64-apple-darwin $BINARIES cargo zigbuild --profile production --target universal2-apple-darwin $BINARIES
zip -j lbee-utils_Mac-x86_64.zip target/x86_64-apple-darwin/production/czutil target/x86_64-apple-darwin/production/pakutil zip -j lbee-utils_Mac-Universal.zip target/universal2-apple-darwin/production/czutil target/universal2-apple-darwin/production/pakutil
gh release upload ${{ github.ref_name }} lbee-utils_Mac-x86_64.zip gh release upload ${{ github.ref_name }} lbee-utils_Mac-Universal.zip
env:
GITHUB_TOKEN: ${{ github.TOKEN }}
shell: bash
- name: '📦 Package MacOS Arm'
run: |
cd ${{github.workspace}}
cargo build --profile production --target aarch64-apple-darwin $BINARIES
zip -j lbee-utils_Mac-Arm.zip target/aarch64-apple-darwin/production/czutil target/aarch64-apple-darwin/production/pakutil
gh release upload ${{ github.ref_name }} lbee-utils_Mac-Arm.zip
env: env:
GITHUB_TOKEN: ${{ github.TOKEN }} GITHUB_TOKEN: ${{ github.TOKEN }}
shell: bash shell: bash