Skip to content
This repository has been archived by the owner on Oct 8, 2024. It is now read-only.

js: handle empty progress delegate #30

js: handle empty progress delegate

js: handle empty progress delegate #30

Workflow file for this run

name: Build
on: [ push, pull_request ]
jobs:
build-cli:
strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Print dotnet version
run: dotnet --info
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set Library Versions
run: dotnet run --set-version
- name: Set Rust Flags (Windows)
shell: pwsh
run: |
rustup target add i686-pc-windows-msvc
Add-Content -Path $env:GITHUB_ENV -Value "EXTRA_RUST_FLAGS=--target i686-pc-windows-msvc"
if: ${{ matrix.os == 'windows-latest' }}
- name: Set Rust Flags (Linux)
run: echo "EXTRA_RUST_FLAGS=--target x86_64-unknown-linux-gnu" >> "$GITHUB_ENV"
if: ${{ matrix.os == 'ubuntu-latest' }}
- name: Build Rust
working-directory: for-rust
run: cargo build --features cli --release ${{ env.EXTRA_RUST_FLAGS }}
- name: Collect Rust Binaries (Windows)
working-directory: for-rust/target
run: |
copy i686-pc-windows-msvc\release\*.exe release
copy i686-pc-windows-msvc\release\*.pdb release
if: ${{ matrix.os == 'windows-latest' }}
- name: Collect Rust Binaries (Linux)
working-directory: for-rust/target
run: cp ./x86_64-unknown-linux-gnu/release/vfusion ./release/VfusionNix
if: ${{ matrix.os == 'ubuntu-latest' }}
- name: Collect Rust Binaries (OSX)
working-directory: for-rust/target/release
run: cp vfusion VfusionMac
if: ${{ matrix.os == 'macos-latest' }}
- name: Upload Rust Artifacts
uses: actions/upload-artifact@v4
with:
name: rust-${{ matrix.os }}
path: |
for-rust/target/release/VfusionMac
for-rust/target/release/VfusionNix
for-rust/target/release/Vfusion.exe
build-fusion:
needs: [build-cli]
runs-on: windows-latest
steps:
- name: Print dotnet version
run: dotnet --info
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set Library Versions
run: dotnet run --set-version
- name: Build Fusion
run: dotnet run
- name: Download Rust OSX
uses: actions/download-artifact@v4
with:
name: rust-macos-latest
path: for-js/bin
- name: Download Rust Windows
uses: actions/download-artifact@v4
with:
name: rust-windows-latest
path: for-js/bin
- name: Download Rust Linux
uses: actions/download-artifact@v4
with:
name: rust-ubuntu-latest
path: for-js/bin
- name: Cargo Publish
working-directory: for-rust
if: github.ref == 'refs/heads/master'
run: |
cargo login ${{ secrets.CARGO_TOKEN }}
cargo publish --allow-dirty
- name: NPM Publish
working-directory: for-js
if: github.ref == 'refs/heads/master'
run: |
npm set "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}"
npm publish --access public