| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147 |
- # 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:
- - "core/config.h"
- - "core/iwasm/**"
- - "core/shared/**"
- - "wamr-compiler/**"
- - "product-mini/**"
- - "tests/wamr-test-suites/spec-test-script/**"
- - "tests/wamr-test-suites/test_wamr.sh"
- # will be triggered on push events
- push:
- paths:
- - "core/config.h"
- - "core/iwasm/**"
- - "core/shared/**"
- - "wamr-compiler/**"
- - "product-mini/**"
- - "tests/wamr-test-suites/spec-test-script/**"
- - "tests/wamr-test-suites/test_wamr.sh"
- # 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:
- DEFAULT_TEST_OPTIONS: "-s spec"
- LLVM_CACHE_SUFFIX: "build-llvm_libraries_ex"
- MULTI_MODULES_TEST_OPTIONS: "-s spec -M"
- SIMD_TEST_OPTIONS: "-s spec -S"
- THREADS_TEST_OPTIONS: "-s spec -p"
- X86_32_TARGET_TEST_OPTIONS: "-m x86_32"
- 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 }}
- spec_test_default:
- needs: cancel_previous
- runs-on: ubuntu-20.04
- strategy:
- matrix:
- test_option: [$DEFAULT_TEST_OPTIONS, $SIMD_TEST_OPTIONS]
- steps:
- - name: checkout
- uses: actions/checkout@v2
- - name: Get LLVM libraries
- id: cache_llvm
- uses: actions/cache@v2
- with:
- 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
- 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
- spec_test_extra:
- needs: cancel_previous
- if: ${{ endsWith(github.repository, 'wasm-micro-runtime') }}
- runs-on: ubuntu-20.04
- strategy:
- matrix:
- test_option: [$MULTI_MODULES_TEST_OPTIONS, $THREADS_TEST_OPTIONS]
- steps:
- - name: checkout
- uses: actions/checkout@v2
- - name: Get LLVM libraries
- id: cache_llvm
- uses: actions/cache@v2
- with:
- 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
- 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') }}
- needs: cancel_previous
- runs-on: ubuntu-20.04
- strategy:
- matrix:
- test_option: [$DEFAULT_TEST_OPTIONS, $THREADS_TEST_OPTIONS]
- steps:
- - name: checkout
- uses: actions/checkout@v2
- - name: Get LLVM libraries
- id: cache_llvm
- uses: actions/cache@v2
- with:
- 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
- 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
- run: sudo apt install -y g++-multilib libgcc-9-dev lib32gcc-9-dev ninja-build
- - name: run spec tests
- run: ./test_wamr.sh ${{ env.X86_32_TARGET_TEST_OPTIONS }} ${{ matrix.test_option }}
- working-directory: ./tests/wamr-test-suites
|