-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #272 from moxin-org/dev
Main update 2 Oct
- Loading branch information
Showing
11 changed files
with
221 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,163 @@ | ||
name: Release | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} | ||
cancel-in-progress: true | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
build_ubuntu: | ||
description: 'Build Ubuntu' | ||
required: false | ||
default: 'true' | ||
build_macos: | ||
description: 'Build MacOS' | ||
required: false | ||
default: 'true' | ||
build_windows: | ||
description: 'Build Windows' | ||
required: false | ||
default: 'true' | ||
release_tags: | ||
description: 'Release Page Tags' | ||
required: true | ||
|
||
jobs: | ||
build_ubuntu: | ||
name: Ubuntu | ||
runs-on: ${{ matrix.os }} | ||
if: ${{ github.event.inputs.build_ubuntu == 'true' }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-22.04] | ||
rust: [1.79] | ||
env: | ||
LD_LIBRARY_PATH: ~\.wasmedge\lib | ||
|
||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install WasmEdge | ||
run: | | ||
curl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install_v2.sh | bash -s -- --version=0.14.0 | ||
source $HOME/.wasmedge/env | ||
- name: Install dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install libssl-dev pkg-config llvm clang libclang-dev binfmt-support libxcursor-dev libx11-dev libasound2-dev libpulse-dev | ||
- name: Install Rust-stable | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
toolchain: ${{ matrix.rust }} | ||
|
||
- name: Install cargo-packager | ||
run: | | ||
cargo +stable install --force --locked cargo-packager | ||
- name: Build | ||
run: | | ||
source $HOME/.wasmedge/env | ||
cargo packager --release --verbose | ||
ls dist/ | ||
- name: Upload Dist | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
cd dist/ | ||
gh release upload ${{ github.event.inputs.release_tags }} moxin_*.deb --clobber | ||
gh release upload ${{ github.event.inputs.release_tags }} moxin_*.tar.gz --clobber | ||
gh release upload ${{ github.event.inputs.release_tags }} moxin_*.AppImage --clobber | ||
build_macos: | ||
name: MacOS | ||
runs-on: ${{ matrix.os }} | ||
if: ${{ github.event.inputs.build_macos == 'true' }} | ||
strategy: | ||
matrix: | ||
os: [macos-14, macos-13] | ||
rust: [1.79] | ||
|
||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install WasmEdge | ||
run: | | ||
curl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install_v2.sh | bash -s -- --version=0.14.0 | ||
source $HOME/.wasmedge/env | ||
- name: Install Rust-stable | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
toolchain: ${{ matrix.rust }} | ||
|
||
- name: Install cargo-packager | ||
run: | | ||
cargo +stable install --force --locked cargo-packager | ||
- name: Build | ||
run: | | ||
cargo packager --release --verbose | ||
ls dist/ | ||
- name: Upload Dist | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
cd dist/ | ||
gh release upload ${{ github.event.inputs.release_tags }} Moxin_*.dmg --clobber | ||
build_windows: | ||
name: Windows | ||
runs-on: windows-2022 | ||
if: ${{ github.event.inputs.build_windows == 'true' }} | ||
strategy: | ||
matrix: | ||
rust: [1.79] | ||
env: | ||
WASMEDGE_DIR: ${{ github.workspace }}\WasmEdge-0.14.0-Windows | ||
steps: | ||
- name: Display ENV | ||
run: | | ||
echo $env:WASMEDGE_DIR | ||
- name: Checkout sources | ||
uses: actions/checkout@v3 | ||
|
||
- name: Download WasmEdge | ||
run: | | ||
$ProgressPreference = 'SilentlyContinue' | ||
Invoke-WebRequest -Uri "https://github.com/WasmEdge/WasmEdge/releases/download/0.14.0/WasmEdge-0.14.0-windows.zip" -OutFile "WasmEdge-0.14.0-windows.zip" | ||
Expand-Archive -LiteralPath "WasmEdge-0.14.0-windows.zip" -DestinationPath ${{ github.workspace }} | ||
tree /F ${{ github.workspace }}\WasmEdge | ||
- name: Set up Windows 10 SDK | ||
uses: GuillaumeFalourd/[email protected] | ||
with: | ||
sdk-version: 19041 | ||
|
||
- name: Install Rust-stable | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
toolchain: ${{ matrix.rust }} | ||
|
||
- name: Install cargo-packager | ||
run: | | ||
cargo +stable install --force --locked cargo-packager | ||
- name: Build | ||
run: | | ||
cargo packager --release --formats nsis --verbose | ||
ls dist/ | ||
- name: Upload Dist | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
cd dist/ | ||
$file=Get-ChildItem -Filter *.exe | ||
gh release upload ${{ github.event.inputs.release_tags }} $file.name --clobber | ||
Oops, something went wrong.