Skip to content

updated 178 programs #1574

updated 178 programs

updated 178 programs #1574

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
check-programs:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # OR "2" -> To retrieve the preceding commit.
- id: files
uses: tj-actions/changed-files@v11.5
- name: Check Programs
run: |
mkdir -p $HOME/loda/bin
curl -fsSLo $HOME/loda/bin/loda https://github.com/loda-lang/loda-cpp/releases/latest/download/loda-linux-x86
chmod u+x $HOME/loda/bin/loda
ln -s $(pwd) $HOME/loda/programs
start_time="$(date -u +%s)"
for f in ${{ steps.files.outputs.all_modified_files }}; do
if [[ -f "$f" ]] && [[ $f == oeis/*.asm ]]; then
a=${f:9:7}
d=$(date +"%Y-%m-%d %H:%M:%S")
echo -n "$d Checking $a... "
r=$($HOME/loda/bin/loda check $a)
echo $r
if [ "$r" != "ok" ] && [ "$r" != "warning" ]; then
error=true
fi
fi
end_time="$(date -u +%s)"
elapsed="$(($end_time-$start_time))"
if (( elapsed > 600 )); then
echo "Warning: maximum execution time exceeded, aborting..."
break
fi
done
if [ -n "$error" ]; then
echo "Error occurred while checking programs"
exit 1
fi