You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
wasi-sdk/.github/workflows/main.yml

101 lines
2.9 KiB

name: CI
on:
create:
tags:
push:
branches:
- main
pull_request:
jobs:
build:
name: Native Build
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
steps:
- uses: actions/checkout@v1
with:
submodules: true
- name: Install ninja (macOS)
run: brew install ninja
if: matrix.os == 'macos-latest'
- name: Install ninja (Linux)
run: sudo apt install ninja-build
if: matrix.os == 'ubuntu-latest'
- name: Build
run: NINJA_FLAGS=-v make package
shell: bash
- name: Run the testsuite
run: NINJA_FLAGS=-v make check
- name: Upload artifacts
uses: actions/upload-artifact@v1
with:
# Upload the dist folder. Give it a name according to the OS it was built for.
name: ${{ format( 'dist-{0}', matrix.os) }}
path: dist
winbuild:
name: Windows Build
runs-on: windows-2019
strategy:
fail-fast: false
matrix:
arch:
- x64
- x86
env:
MSYS2_PATH_TYPE: inherit
MSYSTEM: MINGW64
CC: cl
CXX: cl
NINJA_FLAGS: -v
steps:
- uses: actions/checkout@v1
with:
submodules: true
- name: Install ninja (Windows)
run: choco install ninja
- name: Build
shell: cmd
# vcvarsall.bat need explicit Visual Studio 2019 to be installed
run: |
set "HOME=%CD%"
set CL_ARCH=${{ fromJson('{ "x86": "amd64_x86", "x64": "amd64" }')[matrix.arch] }}
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" %CL_ARCH%
C:\msys64\usr\bin\bash.exe --login -c "make package"
- name: Run the testsuite
shell: cmd
run: |
set "HOME=%CD%"
set CL_ARCH=${{ fromJson('{ "x86": "amd64_x86", "x64": "amd64" }')[matrix.arch] }}
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" %CL_ARCH%
C:\msys64\usr\bin\bash.exe --login -c "make check"
- name: Upload artifacts
uses: actions/upload-artifact@v1
with:
# Upload the dist folder. Give it a name according to the OS it was built for.
name: ${{ format( 'dist-windows-latest-{0}', matrix.arch) }}
path: dist
dockerbuild:
name: Docker Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
with:
submodules: true
- name: Run docker_build script
run: ./docker_build.sh
- name: Upload artifacts
uses: actions/upload-artifact@v1
with:
# Upload the dist folder. Give it a name according to the OS it was built for.
name: dist-ubuntu-xenial
path: dist