Skip to content

Commit

Permalink
[CI] Support macOS and Fedora in the standalone workflow (#11)
Browse files Browse the repository at this point in the history
* ci(standalone): add build_macos job

Signed-off-by: Xin Liu <[email protected]>

* ci(standalone): update workflow for testing

Signed-off-by: Xin Liu <[email protected]>

* ci(standalone): update build_macos job

Signed-off-by: Xin Liu <[email protected]>

* chore(rust-sys): comment out `driver_unified_tool` function

Signed-off-by: Xin Liu <[email protected]>

* ci(standalone): test build_fedora job

Signed-off-by: Xin Liu <[email protected]>

* ci(standalone): build_ubuntu_2204 and build_ubuntu_2004 jobs

Signed-off-by: Xin Liu <[email protected]>

* ci(standalone): update workflow

Signed-off-by: Xin Liu <[email protected]>

* chore(rust-sys): enable `driver_unified_tool` function

Signed-off-by: Xin Liu <[email protected]>

---------

Signed-off-by: Xin Liu <[email protected]>
  • Loading branch information
apepkuss authored Jun 19, 2023
1 parent 5e5b86e commit 2b3ca4c
Showing 1 changed file with 66 additions and 36 deletions.
102 changes: 66 additions & 36 deletions .github/workflows/standalone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@ concurrency:
on: workflow_dispatch

jobs:
build_ubuntu:
build_ubuntu_2204:
name: Ubuntu
runs-on: ${{ matrix.os }}
runs-on: ubuntu-22.04
strategy:
matrix:
os: [ubuntu-22.04, ubuntu-20.04]
rust: [1.70.0, 1.69, 1.68]

steps:
Expand Down Expand Up @@ -42,6 +41,40 @@ jobs:
export LD_LIBRARY_PATH=$HOME/.wasmedge/lib
cargo test -p wasmedge-sdk --all --examples --features standalone
build_ubuntu_2004:
name: Ubuntu
runs-on: ubuntu-20.04
strategy:
matrix:
rust: [1.70.0, 1.69, 1.68]

steps:
- name: Checkout WasmEdge Rust SDK
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up build environment
run: |
sudo apt-get update
sudo apt-get install -y software-properties-common libboost-all-dev ninja-build
sudo apt-get install -y llvm-12-dev liblld-12-dev clang-12
sudo apt-get install -y gcc g++
sudo apt-get install -y libssl-dev pkg-config gh
- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.rust }}

- name: Run in the standalone mode
run: |
export LLVM_DIR="/usr/local/opt/llvm/lib/cmake"
export CC=clang
export CXX=clang++
export LD_LIBRARY_PATH=$HOME/.wasmedge/lib
cargo test -p wasmedge-sdk --all --examples --features standalone
build_fedora:
name: Fedora latest
runs-on: Fedora-latest
Expand All @@ -68,8 +101,7 @@ jobs:
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.rust }}



- name: Run in the standalone mode
run: |
export LLVM_DIR="/usr/local/opt/llvm/lib/cmake"
Expand All @@ -78,34 +110,32 @@ jobs:
export LD_LIBRARY_PATH=$HOME/.wasmedge/lib
cargo test -p wasmedge-sdk --all --examples --features standalone
# build_macos:
# name: MacOS
# runs-on: ${{ matrix.os }}
# strategy:
# matrix:
# os: [macos-11, macos-12]

# steps:
# - name: Checkout sources
# uses: actions/checkout@v3
# with:
# fetch-depth: 0

# - name: Install Rust v1.68
# uses: dtolnay/rust-toolchain@stable
# with:
# toolchain: 1.68

# - name: Install build tools
# run: brew install llvm ninja boost cmake

# - name: Install libwasmedge
# working-directory: bindings/rust/
# run: |
# export LLVM_DIR="/usr/local/opt/llvm/lib/cmake"
# export CC=clang
# export CXX=clang++
# export DYLD_LIBRARY_PATH="/Users/runner/.wasmedge/lib"
# export WASMEDGE_DIR="$(pwd)/../../"
# cargo +nightly -Z sparse-registry update
# cargo test -p wasmedge-sdk --all --examples --features standalone
build_macos:
name: MacOS
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-11, macos-12]
rust: [1.70.0, 1.69, 1.68]

steps:
- name: Checkout sources
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.rust }}

- name: Install build tools
run: brew install llvm ninja boost cmake

- name: Install libwasmedge
run: |
export LLVM_DIR="/usr/local/opt/llvm/lib/cmake"
export CC=clang
export CXX=clang++
export DYLD_LIBRARY_PATH=$HOME/.wasmedge/lib
cargo test -p wasmedge-sdk --all --examples --features standalone

0 comments on commit 2b3ca4c

Please sign in to comment.