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://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.0/LLVM-10.0.0-win64.exe
20 7z x LLVM-10.0.0-win64.exe -y -o"llvm"
21 echo "$(pwd)/llvm/bin" >> $GITHUB_PATH
22 echo "WASM_AR=$(pwd)/llvm/bin/llvm-ar.exe" >> $GITHUB_ENV
23 if: matrix.os == 'windows-latest'
25 - name: Install llvm-nm (Windows)
30 rustup component add llvm-tools-preview
31 echo "WASM_NM=$(rustc --print sysroot|sed 's|C:|/c|'|sed 's|\\|/|g')/lib/rustlib/x86_64-pc-windows-msvc/bin/llvm-nm.exe" >> $GITHUB_ENV
32 if: matrix.os == 'windows-latest'
34 - name: Install clang (MacOS)
37 curl -sSfL https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.0/clang+llvm-10.0.0-x86_64-apple-darwin.tar.xz | tar xJf -
38 export CLANG_DIR=`pwd`/clang+llvm-10.0.0-x86_64-apple-darwin/bin
39 echo "$CLANG_DIR" >> $GITHUB_PATH
40 echo "WASM_CC=$CLANG_DIR/clang" >> $GITHUB_ENV
41 if: matrix.os == 'macos-latest'
43 - name: Install clang (Linux)
46 curl -sSfL https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.0/clang+llvm-10.0.0-x86_64-linux-gnu-ubuntu-18.04.tar.xz | tar xJf -
47 export CLANG_DIR=`pwd`/clang+llvm-10.0.0-x86_64-linux-gnu-ubuntu-18.04/bin
48 echo "$CLANG_DIR" >> $GITHUB_PATH
49 echo "WASM_CC=$CLANG_DIR/clang" >> $GITHUB_ENV
50 if: matrix.os == 'ubuntu-latest'
56 - uses: actions/upload-artifact@v1
58 # Upload the sysroot folder. Give it a name according to the OS it was built for.
59 name: ${{ format( 'sysroot-{0}.tgz', matrix.os) }}
63 name: wasi-headers test
64 runs-on: ${{ matrix.os }}
67 os: [ubuntu-latest, macos-latest, windows-latest]
69 - uses: actions/checkout@v1
72 - name: Install Rust (rustup)
74 run: rustup update stable --no-self-update && rustup default stable
75 if: matrix.os != 'macos-latest'
76 - name: Install Rust (macos)
78 curl https://sh.rustup.rs | sh -s -- -y
79 echo "$HOME/.cargo/bin" >> $GITHUB_PATH
80 if: matrix.os == 'macos-latest'
82 working-directory: tools/wasi-headers
84 working-directory: tools/wasi-headers
86 working-directory: tools/wasi-headers
90 runs-on: ubuntu-latest
92 - uses: actions/checkout@v1
96 run: rustup update stable && rustup default stable && rustup component add rustfmt
97 - run: cargo fmt -- --check
98 working-directory: tools/wasi-headers