Fix: temporary fix (by Xiaosu) that introduces locks that prevent sca… #1678
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# CI workflow | |
name: sledge | |
on: [push, pull_request] | |
env: | |
LLVM_VERSION: 13 | |
WASI_SDK_URL: https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-12/wasi-sdk-12.0-linux.tar.gz | |
WASI_SDK_PATH: /opt/wasi-sdk | |
LANG: C.UTF-8 | |
LANGUAGE: C.UTF-8 | |
LC_ALL: C.UTF-8 | |
# job control | |
jobs: | |
format: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Apt Update | |
run: sudo apt-get update | |
- uses: actions/checkout@v2 | |
- name: Install LLVM | |
run: | | |
sudo ./install_llvm.sh $LLVM_VERSION | |
- name: Clang Format | |
run: ./format.sh -d | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Apt Update | |
run: sudo apt-get update | |
- uses: actions/checkout@v2 | |
- name: Init Submodules | |
run: git submodule update --init --recursive | |
- name: Install General GCC C/C++ Build toolchain | |
run: | | |
sudo apt-get install -y --no-install-recommends \ | |
automake \ | |
build-essential \ | |
binutils-dev \ | |
cmake \ | |
git \ | |
libtinfo5 \ | |
libtool \ | |
pkg-config | |
- name: Install curl / wget tools | |
run: | | |
sudo apt-get install -y --no-install-recommends \ | |
curl \ | |
ca-certificates \ | |
libssl-dev \ | |
lsb-release \ | |
gpg-agent \ | |
software-properties-common \ | |
wget | |
- name: Install LLVM | |
run: | | |
sudo ./install_llvm.sh $LLVM_VERSION | |
- name: Install Rust | |
run: | | |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | \ | |
sh -s -- --default-toolchain stable --component rustfmt --target wasm32-wasi -y | |
echo "/root/.cargo/bin:$PATH" >> $GITHUB_PATH | |
- name: Get wasi-sdk | |
run: | | |
wget $WASI_SDK_URL -O wasi-sdk.tar.gz | |
mkdir -p $WASI_SDK_PATH | |
tar xvfz wasi-sdk.tar.gz --strip-components=1 -C $WASI_SDK_PATH | |
- name: Install Test Script Utilities | |
run: | | |
sudo apt-get install -y --no-install-recommends \ | |
fonts-dejavu \ | |
fonts-cascadia-code \ | |
fonts-roboto \ | |
gnuplot \ | |
httpie \ | |
imagemagick \ | |
netpbm \ | |
pango1.0-tools \ | |
wamerican | |
- name: Cache Cargo | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
./awsm/target | |
key: ${{ runner.os }}-cargo-${{ hashFiles('./awsm/Cargo.lock') }} | |
- name: Compile aWsm | |
run: | | |
make awsm | |
- name: Compile libsledge | |
run: | | |
make libsledge | |
- name: Compile SLEdge | |
run: | | |
make runtime | |
- name: Install wasm_apps link | |
run: | | |
make wasm_apps | |
# TODO:Cache assets before being copied to ./runtime/bin | |
- name: Cache gocr | |
uses: actions/cache@v2 | |
with: | |
path: ./runtime/bin/gocr.wasm.so | |
key: ${{ runner.os }}-gocr2-${{ hashFiles('./applications/Makefile', './applications/wasm_apps/gocr/**', './libsledge/Makefile' , './libsledge/src/**', './libsledge/include/**') }} | |
if: success() || failure() | |
- name: Hyde | |
run: | | |
echo $WASI_SDK_PATH | |
ls $WASI_SDK_PATH | |
make -f test.mk gocr__hyde | |
if: success() || failure() | |
- name: Upload Hyde Logs on Failure | |
uses: actions/upload-artifact@v2 | |
if: failure() | |
with: | |
name: hyde-logs | |
path: ./tests/gocr/hyde/res/**/ | |
- name: Handwriting | |
run: | | |
make -f test.mk gocr__handwriting | |
if: success() || failure() | |
- name: Five by Eight | |
run: | | |
make -f test.mk gocr__fivebyeight | |
if: success() || failure() | |
# - name: OCR by Word | |
# run: | | |
# make -f test.mk gocr__by_word | |
# if: success() || failure() | |
# - name: OCR by Font | |
# run: | | |
# make -f test.mk gocr__by_font | |
# if: success() || failure() | |
# - name: OCR by DPI | |
# run: | | |
# make -f test.mk gocr__by_dpi | |
# if: success() || failure() | |
# TODO:Cache assets before being copied to ./runtime/bin | |
- name: Cache EKF | |
uses: actions/cache@v2 | |
with: | |
path: ./runtime/bin/gps_ekf.wasm.so | |
key: ${{ runner.os }}-gocr2-${{ hashFiles('./applications/Makefile', './applications/wasm_apps/TinyEKF/**', './libsledge/Makefile' , './libsledge/src/**', './libsledge/include/**') }} | |
if: success() || failure() | |
- name: EKF one iteration | |
run: | | |
make -f test.mk ekf__one_iteration | |
if: success() || failure() | |
# - name: EKF by Iteration | |
# run: | | |
# make -f test.mk ekf__by_iteration | |
# if: success() || failure() | |
# TODO:Cache assets before being copied to ./runtime/bin | |
- name: Image Classification | |
run: | | |
make -f test.mk cifar10__image_classification | |
if: success() || failure() | |
# TODO:Cache assets before being copied to ./runtime/bin | |
- name: Image Resize | |
run: | | |
make -f test.mk sod__image_resize__test | |
if: success() || failure() | |
# - name: Image Resize by Resolution | |
# run: | | |
# make -f test.mk sod__image_resize__by_resolution | |
# if: success() || failure() | |
# - name: License Plate Detection by Plate Count | |
# run: | | |
# make -f test.mk sod__lpd_by_plate_count | |
# if: success() || failure() | |
# - name: Bimodal | |
# run: | | |
# make -f test.mk fibonacci__bimodal | |
# if: success() || failure() | |
# - name: Concurrency | |
# run: | | |
# make -f test.mk empty__concurrency | |
# if: success() || failure() | |
# - name: Payload | |
# run: | | |
# make -f test.mk TODO | |
# if: success() || failure() | |
- name: Wasm Trap Divide by Zero | |
run: | | |
make -f test.mk trap_divzero | |
if: success() || failure() | |
- name: Wasm Trap Stack Overflow | |
run: | | |
make -f test.mk stack_overflow | |
if: success() || failure() |