Skip to content

Commit

Permalink
Added workflows for compilation with custom marian
Browse files Browse the repository at this point in the history
 - Custom marian means only those marian features that
   are required for wasm

 - Added workflow for native builds
 - Added workflow for wasm builds
  • Loading branch information
abhi-agg committed Feb 25, 2021
1 parent c2b1c6e commit 2538fb6
Show file tree
Hide file tree
Showing 2 changed files with 79 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/macos-custom-marian-native.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: MacOS Native (Custom)

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build-macos:
name: Native (With Custom Marian)
runs-on: macos-10.15

steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: recursive

- name: Configure CMake
run: |
mkdir -p build-native
cd build-native
cmake ..
- name: Compile
working-directory: build-native
run: make -j2

- name: Print versions
working-directory: build-native
run: ./app/bergamot-translator-app --version
47 changes: 47 additions & 0 deletions .github/workflows/macos-custom-marian-wasm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: MacOS WASM (Custom)

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build-wasm:
name: WASM (With Custom Marian)
runs-on: macos-10.15

steps:
- name: Setup Emscripten toolchain
uses: mymindstorm/setup-emsdk@v8

- name: Verify Emscripten setup
run: emcc -v

- name: Checkout
uses: actions/checkout@v2
with:
submodules: recursive

- name: Configure builds
run: |
mkdir -p build-wasm
cd build-wasm
emcmake cmake -DCOMPILE_WASM=on ..
- name: Compile
working-directory: build-wasm
run: emmake make -j2

- name: Check artifacts
working-directory: build-wasm
run: |
export WASM_ARTIFACTS_DIR=wasm
ls -all ${WASM_ARTIFACTS_DIR}
if ls ${WASM_ARTIFACTS_DIR}/*.wasm &>/dev/null && ls ${WASM_ARTIFACTS_DIR}/*.js &>/dev/null
then
echo "Artifacts Successfully Generated"
else
echo "Failure: Artifacts Not Present"
exit 1
fi

0 comments on commit 2538fb6

Please sign in to comment.