Skip to content

0.1.2

0.1.2 #14

Workflow file for this run

name: Rust_lib
on:
#push:
# branches: [ "main" ]
release:
types:
- created
env:
CARGO_TERM_COLOR: always
jobs:
windows_job:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Build and Package Libraries (Windows)
run: |
# Build for Windows target (using Windows commands)
cargo build --release
shell: powershell
working-directory: ${{ github.workspace }}
- name: Build Archive
run: |
mkdir hallr
mkdir hallr/hallr
mkdir hallr/hallr/lib
cp blender_addon/.hallr hallr
cp blender_addon/*.py hallr/hallr
cp target/release/hallr.dll hallr/hallr/lib/
working-directory: ${{ github.workspace }}
- name: Upload Archive
uses: actions/upload-artifact@v3
with:
name: hallr
path: hallr
linux_job:
runs-on: ubuntu-latest
needs: windows_job
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Prepare Archive
run: mkdir hallr
working-directory: ${{ github.workspace }}
- name: Download Previous Artifacts
uses: actions/download-artifact@v3
with:
name: hallr
path: hallr
- name: Build and Package Libraries (Linux)
run: |
# Build for Linux target (using Bash)
cargo build --release
shell: bash
working-directory: ${{ github.workspace }}
- name: Append to Archive
run: |
# Append Linux artifacts to the existing archive
cp target/release/libhallr.so hallr/hallr/lib/
working-directory: ${{ github.workspace }}
- name: Upload Archive
uses: actions/upload-artifact@v3
with:
name: hallr
path: hallr
macos_x86_job:
runs-on: macos-latest
needs: linux_job
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Prepare Archive
run: mkdir hallr
working-directory: ${{ github.workspace }}
- name: Download Previous Artifacts
uses: actions/download-artifact@v3
with:
name: hallr
path: hallr
- name: Build and Package Libraries (macOS)
run: |
# Build for macOS x86 target (using Bash)
cargo build --release
shell: bash
working-directory: ${{ github.workspace }}
- name: Append to Archive
run: cp target/release/libhallr.dylib hallr/hallr/lib/
working-directory: ${{ github.workspace }}
- name: Upload Archive
uses: actions/upload-artifact@v3
with:
name: hallr
path: hallr
macos_arm_job:
runs-on: macos-latest # we are still using x86 mac here, I need sponsors to pay for macos-latest-xl
needs: macos_x86_job
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Prepare Archive
run: mkdir hallr
working-directory: ${{ github.workspace }}
- name: Download Previous Artifacts
uses: actions/download-artifact@v3
with:
name: hallr
path: hallr
- name: Build and Package Libraries (macOS)
run: |
# Build for macOS arm target (using Bash)
cargo build --release
shell: bash
working-directory: ${{ github.workspace }}
- name: Build fat library
run: |
#lipo -create target/release/libhallr.dylib lib/libhallr.dylib -output target/libhallr.dylib
#mv target/libhallr.dylib target/release
working-directory: ${{ github.workspace }}
- name: Append to Archive
run: |
# Append macOS artifacts to the existing archive
cp target/release/libhallr.dylib hallr/hallr/lib/
working-directory: ${{ github.workspace }}
- name: Upload Archive
uses: actions/upload-artifact@v3
with:
name: hallr
path: hallr