Skip to content

Fix linking on macOS. #208

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Jan 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 28 additions & 8 deletions .github/workflows/cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ on:
jobs:

format:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2
Expand All @@ -58,33 +58,53 @@ jobs:
addlicense -check .

build:
name: build (${{ matrix.runtime }})
name: build (${{ matrix.name }})

runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
runtime: ["wamr", "wasmtime", "wavm"]
include:
- name: 'WAMR on Linux'
runtime: 'wamr'
os: ubuntu-20.04
- name: 'WAMR on macOS'
runtime: 'wamr'
os: macos-11
- name: 'Wasmtime on Linux'
runtime: 'wasmtime'
os: ubuntu-20.04
- name: 'Wasmtime on macOS'
runtime: 'wasmtime'
os: macos-11
- name: 'WAVM on Linux'
runtime: 'wavm'
os: ubuntu-20.04

steps:
- uses: actions/checkout@v2

- name: Install dependency
- name: Install dependency (Linux)
if: startsWith(matrix.os, 'ubuntu')
run: sudo apt-get install ninja-build

- name: Install dependency (macOS)
if: startsWith(matrix.os, 'macos')
run: brew install ninja

- name: Mount Bazel cache
uses: actions/cache@v2
with:
path: |
~/.cache/bazel
~/.cache/bazelisk
key: bazel-${{ matrix.runtime }}-${{ hashFiles('WORKSPACE', '.bazelrc', '.bazelversion', 'bazel/cargo/Cargo.raze.lock', 'bazel/dependencies.bzl', 'bazel/repositories.bzl') }}
key: bazel-${{ matrix.os }}-${{ matrix.runtime }}-${{ hashFiles('WORKSPACE', '.bazelrc', '.bazelversion', 'bazel/cargo/Cargo.raze.lock', 'bazel/dependencies.bzl', 'bazel/repositories.bzl') }}

- name: Test
run: |
bazel test --define runtime=${{ matrix.runtime }} //test/...
bazel test --test_output=errors --define runtime=${{ matrix.runtime }} //test/...

- name: Test (signed Wasm module)
run: |
bazel test --define runtime=${{ matrix.runtime }} --per_file_copt=//...@-DPROXY_WASM_VERIFY_WITH_ED25519_PUBKEY=\"$(xxd -p -c 256 test/test_data/signature_key1.pub | cut -b9-)\" //test:signature_util_test
bazel test --test_output=errors --define runtime=${{ matrix.runtime }} --per_file_copt=//...@-DPROXY_WASM_VERIFY_WITH_ED25519_PUBKEY=\"$(xxd -p -c 256 test/test_data/signature_key1.pub | cut -b9-)\" //test:signature_util_test
9 changes: 9 additions & 0 deletions test/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ package(default_visibility = ["//visibility:public"])
cc_test(
name = "null_vm_test",
srcs = ["null_vm_test.cc"],
linkstatic = 1,
deps = [
"//:lib",
"@com_google_googletest//:gtest",
Expand All @@ -20,6 +21,7 @@ cc_test(
data = [
"//test/test_data:abi_export.wasm",
],
linkstatic = 1,
deps = [
":utility_lib",
"//:lib",
Expand All @@ -36,6 +38,7 @@ cc_test(
"//test/test_data:abi_export.signed.with.key2.wasm",
"//test/test_data:abi_export.wasm",
],
linkstatic = 1,
# Test only when compiled to verify plugins.
tags = ["manual"],
deps = [
Expand All @@ -54,6 +57,7 @@ cc_test(
"//test/test_data:callback.wasm",
"//test/test_data:trap.wasm",
],
linkstatic = 1,
deps = [
":utility_lib",
"//:lib",
Expand All @@ -69,6 +73,7 @@ cc_test(
"//test/test_data:clock.wasm",
"//test/test_data:env.wasm",
],
linkstatic = 1,
deps = [
":utility_lib",
"//:lib",
Expand All @@ -83,6 +88,7 @@ cc_test(
data = [
"//test/test_data:abi_export.wasm",
],
linkstatic = 1,
deps = [
":utility_lib",
"//:lib",
Expand All @@ -94,6 +100,7 @@ cc_test(
cc_test(
name = "shared_data",
srcs = ["shared_data_test.cc"],
linkstatic = 1,
deps = [
"//:lib",
"@com_google_googletest//:gtest",
Expand All @@ -104,6 +111,7 @@ cc_test(
cc_test(
name = "shared_queue",
srcs = ["shared_queue_test.cc"],
linkstatic = 1,
deps = [
"//:lib",
"@com_google_googletest//:gtest",
Expand All @@ -114,6 +122,7 @@ cc_test(
cc_test(
name = "vm_id_handle",
srcs = ["vm_id_handle_test.cc"],
linkstatic = 1,
deps = [
"//:lib",
"@com_google_googletest//:gtest",
Expand Down