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.
sledge/.github/workflows/main.yaml

186 lines
6.0 KiB

# CI workflow
name: sledge
on: [push, pull_request]
env:
LLVM_VERSION: 8
WASMCEPTION_URL: https://github.com/gwsystems/wasmception/releases/download/v0.2.0/wasmception-linux-x86_64-0.2.0.tar.gz
# WASI_SDK: /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:
- uses: actions/checkout@v2
- name: Install clang-format-11
run: |
sudo apt-get remove -y --no-install-recommends clang-format-10 && sudo apt-get install -y --no-install-recommends clang-format-11
- name: Update alternatives
run: |
sudo update-alternatives --remove-all clang-format && sudo update-alternatives --install /usr/bin/clang-format clang-format "/usr/bin/clang-format-11" 100
- 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 wasmception
run: |
wget $WASMCEPTION_URL -O wasmception.tar.gz
mkdir -p awsm/wasmception
tar xvfz wasmception.tar.gz -C awsm/wasmception
# - name: Get WASI-SDK
# run: |
# curl -sS -L -O https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-8/wasi-sdk_8.0_amd64.deb && sudo dpkg -i wasi-sdk_8.0_amd64.deb && rm -f wasi-sdk_8.0_amd64.deb
# echo "ENV WASI_SDK=/opt/wasi-sdk" >> $GITHUB_ENV
- name: Install Test Script Utilities
run: |
4 years ago
sudo apt-get install -y --no-install-recommends \
fonts-dejavu \
fonts-cascadia-code \
fonts-roboto \
gnuplot \
4 years ago
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 sledge
run: |
make build
make rtinit
mkdir bin
mkdir lib
SYS_PREFIX="$(pwd)" ./install.sh
PATH="$(pwd)/bin:$PATH"
echo "$PATH" >> $GITHUB_PATH
LD_LIBRARY_PATH="$(pwd)/lib:$LD_LIBRARY_PATH"
echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH" >> $GITHUB_ENV
make build-validate
# 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('./runtime/tests/gocr') }}
if: success() || failure()
- name: Hyde
run: |
./test.sh ocr_hyde
if: success() || failure()
- name: Upload Hyde Logs on Failure
uses: actions/upload-artifact@v2
if: failure()
with:
name: hyde-logs
path: ./runtime/experiments/applications/ocr/hyde/res/**/
- name: Handwriting
run: |
./test.sh ocr_handwriting
if: success() || failure()
- name: Five by Eight
run: |
./test.sh ocr_fivebyeight
if: success() || failure()
# - name: OCR by Word
# run: |
# ./test.sh ocr_by_word
# if: success() || failure()
# - name: OCR by Font
# run: |
# ./test.sh ocr_by_font
# if: success() || failure()
# - name: OCR by DPI
# run: |
# ./test.sh ocr_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/ekf_wasm.so
key: ${{ runner.os }}-gocr2-${{ hashFiles('./runtime/tests/TinyEKF') }}
if: success() || failure()
- name: EKF one iteration
run: |
./test.sh ekf_one_iteration
if: success() || failure()
# - name: EKF by Iteration
# run: |
# ./test.sh ekf_by_iteration
# if: success() || failure()
# TODO:Cache assets before being copied to ./runtime/bin
- name: Image Classification
run: |
./test.sh image_classification
if: success() || failure()
# TODO:Cache assets before being copied to ./runtime/bin
- name: Image Resize
run: |
./test.sh image_resize
if: success() || failure()
# - name: Image Resize by Resolution
# run: |
# ./test.sh image_resize_by_resolution
# if: success() || failure()
# - name: License Plate Detection by Plate Count
# run: |
# ./test.sh lpd_by_plate_count
# if: success() || failure()
# - name: Bimodal
# run: |
# ./test.sh bimodal
# if: success() || failure()
# - name: Concurrency
# run: |
# ./test.sh concurrency
# if: success() || failure()
# - name: Payload
# run: |
# ./test.sh payload
# if: success() || failure()