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 LLVM tools (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 "CC=$(pwd)/llvm/bin/clang.exe" >> $GITHUB_ENV
23 echo "AR=$(pwd)/llvm/bin/llvm-ar.exe" >> $GITHUB_ENV
24 echo "WASM_NM=$(pwd)/llvm/bin/llvm-nm.exe" >> $GITHUB_ENV
25 if: matrix.os == 'windows-latest'
27 - name: Override llvm-nm with one from rustup (Windows)
31 rustup component add llvm-tools-preview
32 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
33 if: matrix.os == 'windows-latest'
35 - name: Install LLVM tools (MacOS)
38 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 -
39 export CLANG_DIR=`pwd`/clang+llvm-10.0.0-x86_64-apple-darwin/bin
40 echo "$CLANG_DIR" >> $GITHUB_PATH
41 echo "CC=$CLANG_DIR/clang" >> $GITHUB_ENV
42 echo "AR=$CLANG_DIR/llvm-ar" >> $GITHUB_ENV
43 echo "WASM_NM=$CLANG_DIR/llvm-nm" >> $GITHUB_ENV
44 if: matrix.os == 'macos-latest'
46 - name: Install LLVM tools (Linux)
49 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 -
50 export CLANG_DIR=`pwd`/clang+llvm-10.0.0-x86_64-linux-gnu-ubuntu-18.04/bin
51 echo "$CLANG_DIR" >> $GITHUB_PATH
52 echo "CC=$CLANG_DIR/clang" >> $GITHUB_ENV
53 echo "AR=$CLANG_DIR/llvm-ar" >> $GITHUB_ENV
54 echo "WASM_NM=$CLANG_DIR/llvm-nm" >> $GITHUB_ENV
55 if: matrix.os == 'ubuntu-latest'
61 - uses: actions/upload-artifact@v1
63 # Upload the sysroot folder. Give it a name according to the OS it was built for.
64 name: ${{ format( 'sysroot-{0}.tgz', matrix.os) }}
67 # Disable the headerstest job for now, while WASI transitions from the
68 # witx snapshots to wit proposals, and we have a few manual edits to the
69 # generated header to make life easier for folks.
71 if: ${{ false }} # Disable the headers test for now.
72 name: wasi-headers test
73 runs-on: ${{ matrix.os }}
76 os: [ubuntu-latest, macos-latest, windows-latest]
78 - uses: actions/checkout@v1
81 - name: Install Rust (rustup)
83 run: rustup update stable --no-self-update && rustup default stable
84 if: matrix.os != 'macos-latest'
85 - name: Install Rust (macos)
87 curl https://sh.rustup.rs | sh -s -- -y
88 echo "$HOME/.cargo/bin" >> $GITHUB_PATH
89 if: matrix.os == 'macos-latest'
91 working-directory: tools/wasi-headers
93 working-directory: tools/wasi-headers
95 working-directory: tools/wasi-headers
99 runs-on: ubuntu-latest
101 - uses: actions/checkout@v1
105 run: rustup update stable && rustup default stable && rustup component add rustfmt
106 - run: cargo fmt -- --check
107 working-directory: tools/wasi-headers