2 on: [push, pull_request]
7 runs-on: ${{ matrix.os }}
10 os: [ubuntu-latest, macos-latest, windows-latest]
12 - uses: actions/checkout@v1
16 - name: Install clang (Windows)
19 curl -fsSLO https://releases.llvm.org/8.0.0/LLVM-8.0.0-win64.exe
20 7z x LLVM-8.0.0-win64.exe -y -o"llvm"
21 echo "::add-path::$(pwd)/llvm/bin"
22 echo "::set-env name=WASM_AR::$(pwd)/llvm/bin/llvm-ar.exe"
23 if: matrix.os == 'windows-latest'
25 - name: Install llvm-nm (Windows)
28 # Add --no-self-update as a workaround for
29 # https://github.com/microsoft/azure-pipelines-image-generation/issues/1224
30 rustup update stable --no-self-update
32 rustup component add llvm-tools-preview
33 echo "::set-env name=WASM_NM::$(rustc --print sysroot|sed 's|C:|/c|'|sed 's|\\|/|g')/lib/rustlib/x86_64-pc-windows-msvc/bin/llvm-nm.exe"
34 if: matrix.os == 'windows-latest'
36 - name: Install clang (MacOS)
39 curl -sSf http://releases.llvm.org/8.0.0/clang+llvm-8.0.0-x86_64-apple-darwin.tar.xz | tar xJf -
40 export CLANG_DIR=`pwd`/clang+llvm-8.0.0-x86_64-apple-darwin/bin
41 echo "::add-path::$CLANG_DIR"
42 echo "::set-env name=WASM_CC::$CLANG_DIR/clang"
43 if: matrix.os == 'macos-latest'
45 - name: Install clang (Linux)
48 curl -sSf http://releases.llvm.org/8.0.0/clang+llvm-8.0.0-x86_64-linux-gnu-ubuntu-16.04.tar.xz | tar xJf -
49 export CLANG_DIR=`pwd`/clang+llvm-8.0.0-x86_64-linux-gnu-ubuntu-16.04/bin
50 echo "::add-path::$CLANG_DIR"
51 echo "::set-env name=WASM_CC::$CLANG_DIR/clang"
52 if: matrix.os == 'ubuntu-latest'
58 - uses: actions/upload-artifact@v1
60 # Upload the sysroot folder. Give it a name according to the OS it was built for.
61 name: ${{ format( 'sysroot-{0}.tgz', matrix.os) }}
65 name: wasi-headers test
66 runs-on: ${{ matrix.os }}
69 os: [ubuntu-latest, macos-latest, windows-latest]
71 - uses: actions/checkout@v1
74 - name: Install Rust (rustup)
76 run: rustup update stable --no-self-update && rustup default stable
77 if: matrix.os != 'macos-latest'
78 - name: Install Rust (macos)
80 curl https://sh.rustup.rs | sh -s -- -y
81 echo "##[add-path]$HOME/.cargo/bin"
82 if: matrix.os == 'macos-latest'
84 working-directory: tools/wasi-headers
86 working-directory: tools/wasi-headers
88 working-directory: tools/wasi-headers
92 runs-on: ubuntu-latest
94 - uses: actions/checkout@v1
98 run: rustup update stable && rustup default stable && rustup component add rustfmt
99 - run: cargo fmt -- --check
100 working-directory: tools/wasi-headers