cpp_roi update to latest #1
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
name: tests and coverage | |
# Uses the cron schedule for github actions | |
# | |
# https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows#scheduled-events | |
# | |
# ┌───────────── minute (0 - 59) | |
# │ ┌───────────── hour (0 - 23) | |
# │ │ ┌───────────── day of the month (1 - 31) | |
# │ │ │ ┌───────────── month (1 - 12 or JAN-DEC) | |
# │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT) | |
# │ │ │ │ │ | |
# │ │ │ │ │ | |
# │ │ │ │ │ | |
# * * * * * | |
on: | |
push: | |
branches: | |
- main | |
- dev | |
pull_request: | |
branches: '*' | |
schedule: | |
- cron: "0 0 1 * *" | |
env: | |
OCTFLAGS: --no-gui --no-window-system --silent | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Install dependencies | |
run: | | |
sudo apt-get -y -qq update | |
sudo apt-get -y install octave liboctave-dev | |
sudo apt-get -y install nodejs npm | |
- name: Clone cpp_spm | |
uses: actions/checkout@v2 | |
with: | |
submodules: true | |
fetch-depth: 2 | |
- name: Install SPM | |
run: | | |
git clone https://github.com/spm/spm12.git --depth 1 | |
make -C spm12/src PLATFORM=octave distclean | |
make -C spm12/src PLATFORM=octave | |
make -C spm12/src PLATFORM=octave install | |
octave $OCTFLAGS --eval "addpath(fullfile(pwd, 'spm12')); savepath();" | |
- name: Install Moxunit and MOcov | |
run: | | |
git clone https://github.com/MOxUnit/MOxUnit.git --depth 1 | |
make -C MOxUnit install | |
git clone https://github.com/MOcov/MOcov.git --depth 1 | |
make -C MOcov install | |
- name: Update octave path | |
run: | | |
octave $OCTFLAGS --eval "initCppSpm; savepath(); exit;" | |
octave $OCTFLAGS --eval "addpath(fullfile(pwd, 'tests', 'utils')); savepath(); exit;" | |
- name: Prepare data | |
run: | | |
octave $OCTFLAGS --eval "initCppSpm; cd demos/MoAE; download_moae_ds(true); exit;" | |
cd tests | |
make data | |
- name: Run tests | |
run: | | |
octave $OCTFLAGS --eval "run_tests" | |
cat test_report.log | grep 0 | |
bash <(curl -s https://codecov.io/bash) | |