2021-10-11 12:32:29 +00:00
|
|
|
# Copyright (C) 2019 Intel Corporation. All rights reserved.
|
|
|
|
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
|
|
name: Spec tests on non-windows
|
|
|
|
|
|
|
|
on:
|
|
|
|
# will be triggered on PR events
|
|
|
|
pull_request:
|
|
|
|
paths:
|
2021-10-13 07:13:00 +00:00
|
|
|
- "core/config.h"
|
2021-10-11 12:32:29 +00:00
|
|
|
- "core/iwasm/**"
|
2021-10-12 03:30:58 +00:00
|
|
|
- "core/shared/**"
|
|
|
|
- "wamr-compiler/**"
|
|
|
|
- "product-mini/**"
|
2021-10-14 07:48:45 +00:00
|
|
|
- "tests/wamr-test-suites/spec-test-script/**"
|
|
|
|
- "tests/wamr-test-suites/test_wamr.sh"
|
2022-03-08 03:52:32 +00:00
|
|
|
- ".github/workflows/spec_test.yml"
|
2021-10-12 06:52:16 +00:00
|
|
|
# will be triggered on push events
|
|
|
|
push:
|
|
|
|
paths:
|
2021-10-13 07:13:00 +00:00
|
|
|
- "core/config.h"
|
2021-10-12 06:52:16 +00:00
|
|
|
- "core/iwasm/**"
|
|
|
|
- "core/shared/**"
|
|
|
|
- "wamr-compiler/**"
|
|
|
|
- "product-mini/**"
|
2021-10-14 07:48:45 +00:00
|
|
|
- "tests/wamr-test-suites/spec-test-script/**"
|
|
|
|
- "tests/wamr-test-suites/test_wamr.sh"
|
2022-03-08 03:52:32 +00:00
|
|
|
- ".github/workflows/spec_test.yml"
|
2021-10-11 12:32:29 +00:00
|
|
|
# allow to be triggered manually
|
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
# Cancel any in-flight jobs for the same PR/branch so there's only one active
|
|
|
|
# at a time
|
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
|
|
|
env:
|
2021-11-08 04:39:02 +00:00
|
|
|
DEFAULT_TEST_OPTIONS: "-s spec -P"
|
2021-10-30 01:24:03 +00:00
|
|
|
LLVM_CACHE_SUFFIX: "build-llvm_libraries_ex"
|
2021-11-08 04:39:02 +00:00
|
|
|
MULTI_MODULES_TEST_OPTIONS: "-s spec -M -P"
|
|
|
|
SIMD_TEST_OPTIONS: "-s spec -S -P"
|
|
|
|
THREADS_TEST_OPTIONS: "-s spec -p -P"
|
|
|
|
X86_32_TARGET_TEST_OPTIONS: "-m x86_32 -P"
|
2021-10-11 12:32:29 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
cancel_previous:
|
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
steps:
|
|
|
|
- name: Cancel Workflow Action
|
|
|
|
uses: styfle/cancel-workflow-action@0.6.0
|
|
|
|
with:
|
|
|
|
access_token: ${{ github.token }}
|
|
|
|
|
2021-10-15 09:05:07 +00:00
|
|
|
spec_test_default:
|
2021-10-27 09:26:17 +00:00
|
|
|
needs: cancel_previous
|
2021-10-11 12:32:29 +00:00
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2021-10-27 09:26:17 +00:00
|
|
|
test_option: [$DEFAULT_TEST_OPTIONS, $SIMD_TEST_OPTIONS]
|
2021-10-11 12:32:29 +00:00
|
|
|
steps:
|
|
|
|
- name: checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Get LLVM libraries
|
|
|
|
id: cache_llvm
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
2021-10-27 09:26:17 +00:00
|
|
|
path: |
|
|
|
|
./core/deps/llvm/build/bin
|
|
|
|
./core/deps/llvm/build/include
|
|
|
|
./core/deps/llvm/build/lib
|
|
|
|
./core/deps/llvm/build/libexec
|
|
|
|
./core/deps/llvm/build/share
|
2021-10-11 12:32:29 +00:00
|
|
|
key: ubuntu-20.04-${{ env.LLVM_CACHE_SUFFIX }}
|
|
|
|
|
|
|
|
- name: install Ninja
|
|
|
|
run: sudo apt install -y ninja-build
|
|
|
|
|
|
|
|
- name: run spec tests
|
|
|
|
run: ./test_wamr.sh ${{ matrix.test_option }}
|
|
|
|
working-directory: ./tests/wamr-test-suites
|
2021-10-15 09:05:07 +00:00
|
|
|
|
|
|
|
spec_test_extra:
|
2021-10-27 09:26:17 +00:00
|
|
|
needs: cancel_previous
|
2021-10-15 09:05:07 +00:00
|
|
|
if: ${{ endsWith(github.repository, 'wasm-micro-runtime') }}
|
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2021-10-27 09:26:17 +00:00
|
|
|
test_option: [$MULTI_MODULES_TEST_OPTIONS, $THREADS_TEST_OPTIONS]
|
2021-10-15 09:05:07 +00:00
|
|
|
steps:
|
|
|
|
- name: checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Get LLVM libraries
|
|
|
|
id: cache_llvm
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
2021-10-27 09:26:17 +00:00
|
|
|
path: |
|
|
|
|
./core/deps/llvm/build/bin
|
|
|
|
./core/deps/llvm/build/include
|
|
|
|
./core/deps/llvm/build/lib
|
|
|
|
./core/deps/llvm/build/libexec
|
|
|
|
./core/deps/llvm/build/share
|
2021-10-15 09:05:07 +00:00
|
|
|
key: ubuntu-20.04-${{ env.LLVM_CACHE_SUFFIX }}
|
|
|
|
|
|
|
|
- name: Quit if cache miss
|
|
|
|
if: steps.cache_llvm.outputs.cache-hit != 'true'
|
|
|
|
run: echo "::error::can not get prebuilt llvm libraries" && exit 1
|
|
|
|
|
|
|
|
- name: install Ninja
|
|
|
|
run: sudo apt install -y ninja-build
|
|
|
|
|
|
|
|
- name: run spec tests
|
|
|
|
run: ./test_wamr.sh ${{ matrix.test_option }}
|
|
|
|
working-directory: ./tests/wamr-test-suites
|
|
|
|
|
|
|
|
spec_test_x86_32:
|
|
|
|
if: ${{ endsWith(github.repository, 'wasm-micro-runtime') }}
|
2021-10-27 09:26:17 +00:00
|
|
|
needs: cancel_previous
|
2021-10-15 09:05:07 +00:00
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2021-10-27 09:26:17 +00:00
|
|
|
test_option: [$DEFAULT_TEST_OPTIONS, $THREADS_TEST_OPTIONS]
|
2021-10-15 09:05:07 +00:00
|
|
|
steps:
|
|
|
|
- name: checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Get LLVM libraries
|
|
|
|
id: cache_llvm
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
2021-10-27 09:26:17 +00:00
|
|
|
path: |
|
|
|
|
./core/deps/llvm/build/bin
|
|
|
|
./core/deps/llvm/build/include
|
|
|
|
./core/deps/llvm/build/lib
|
|
|
|
./core/deps/llvm/build/libexec
|
|
|
|
./core/deps/llvm/build/share
|
2021-10-15 09:05:07 +00:00
|
|
|
key: ubuntu-20.04-${{ env.LLVM_CACHE_SUFFIX }}
|
|
|
|
|
|
|
|
- name: Quit if cache miss
|
|
|
|
if: steps.cache_llvm.outputs.cache-hit != 'true'
|
|
|
|
run: echo "::error::can not get prebuilt llvm libraries" && exit 1
|
|
|
|
|
|
|
|
- name: install Ninja and x32 support libraries
|
2022-03-08 03:52:32 +00:00
|
|
|
run:
|
|
|
|
# Add another apt repository as some packages cannot
|
|
|
|
# be downloaded with the github default repository
|
|
|
|
sudo curl -sSL https://packages.microsoft.com/keys/microsoft.asc | sudo tee /etc/apt/trusted.gpg.d/microsoft.asc &&
|
|
|
|
sudo apt-add-repository https://packages.microsoft.com/ubuntu/20.04/prod &&
|
|
|
|
sudo apt-get update &&
|
|
|
|
sudo apt install -y g++-multilib lib32gcc-9-dev ninja-build
|
2021-10-15 09:05:07 +00:00
|
|
|
|
|
|
|
- name: run spec tests
|
|
|
|
run: ./test_wamr.sh ${{ env.X86_32_TARGET_TEST_OPTIONS }} ${{ matrix.test_option }}
|
|
|
|
working-directory: ./tests/wamr-test-suites
|