diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cf0b710fd9..f433099663 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -185,3 +185,49 @@ jobs: - run: make clang-debug - name: tests (wasm2c tests excluding memory64) run: ./test/run-tests.py wasm2c --exclude-dir memory64 + + build-arch: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + arch: [s390x] + steps: + - uses: actions/setup-python@v1 + with: + python-version: '3.x' + - uses: actions/checkout@v1 + with: + submodules: true + - name: Set up QEMU + if: ${{ matrix.arch != 'i386' }} + uses: docker/setup-qemu-action@v2 + with: + platforms: ${{matrix.arch}} + image: "tonistiigi/binfmt:master" + - name: install ninja + run: sudo apt-get install ninja-build + - name: install the toolchain + run: sudo apt-get install g++-${{matrix.arch}}-linux-gnu + - name: mkdir + run: mkdir -p out + - name: cmake + run: cmake -DCMAKE_TOOLCHAIN_FILE=../scripts/TC-${{matrix.arch}}.cmake .. -G Ninja -DWITH_WASI=ON -DWERROR=OFF -Werror=dev -Wno-deprecated + working-directory: out + - name: build + run: cmake --build out + - name: check if generated files are up-to-date + run: python ./scripts/check_clean.py + - name: unittests + run: cmake --build out --target run-unittests + env: + QEMU_LD_PREFIX: /usr/${{matrix.arch}}-linux-gnu/ + - name: c-api-tests + run: cmake --build out --target run-c-api-tests + env: + QEMU_LD_PREFIX: /usr/${{matrix.arch}}-linux-gnu/ + if: ${{ matrix.arch != 's390x' }} + - name: tests + run: cmake --build out --target run-tests + env: + QEMU_LD_PREFIX: /usr/${{matrix.arch}}-linux-gnu/ diff --git a/scripts/TC-s390x.cmake b/scripts/TC-s390x.cmake new file mode 100644 index 0000000000..5b580984a3 --- /dev/null +++ b/scripts/TC-s390x.cmake @@ -0,0 +1,11 @@ +set(CMAKE_SYSTEM_NAME Linux) + +set(CMAKE_C_COMPILER s390x-linux-gnu-gcc) +set(CMAKE_CXX_COMPILER s390x-linux-gnu-g++) + +set(CMAKE_FIND_ROOT_PATH /usr/s390x-linux-gnu) + +set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) + +set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) +set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)