Skip to content

Update build.yml

Update build.yml #40

Workflow file for this run

name: Build
on:
workflow_dispatch:
push:
branches:
- 'main'
jobs:
build:
runs-on: ubuntu-latest
container:
image: erlang:26.2.5
env:
CMD: src/paterl
BIN: ebin
INCLUDE: include
SRC: src
TEST: test
steps:
- uses: actions/checkout@v1
- name: Compile
run: |
rm -rf $BIN/*.beam erl_crash.dump
mkdir -p $BIN
pwd
erlc -DTEST +debug_info -W0 -I include -o $BIN $SRC/*.erl $SRC/**/*.erl
erlc -DTEST -pa $BIN +debug_info -W0 -I $INCLUDE -o $BIN $TEST/*.erl
- name: List
run: |
ls -lart $BIN
- name: Test
run: |
echo "CodeBEAM/ID server test"
$CMD $SRC/examples/erlang/codebeam/id_server_demo.erl -v all -I include -o $BIN
diff $BIN/id_server_demo $TEST/generated/codebeam/id_server_demo_ref
echo "CodeBEAM/ID TS server test"
$CMD $SRC/examples/erlang/codebeam/id_ts_server_demo.erl -v all -I include -o $BIN
diff $BIN/id_ts_server_demo $TEST/generated/codebeam/id_ts_server_demo_ref
echo "De'Liguoro & Padovani/Future test"
$CMD $SRC/examples/erlang/de_liguoro_padovani/future.erl -v all -I include -o $BIN
diff $BIN/future $TEST/generated/de_liguoro_padovani/future_ref
echo "De'Liguoro & Padovani/Master-worker test"
$CMD $SRC/examples/erlang/de_liguoro_padovani/master_worker.erl -v all -I include -o $BIN
diff $BIN/master_worker $TEST/generated/de_liguoro_padovani/master_worker_ref
echo "De'Liguoro & Padovani/Sessions test"
$CMD $SRC/examples/erlang/de_liguoro_padovani/sessions.erl -v all -I include -o $BIN
diff $BIN/sessions $TEST/generated/de_liguoro_padovani/sessions_ref
echo "Savina/Cigarette smokers test"
$CMD $SRC/examples/erlang/savina/cig_smok.erl -v all -I include -o $BIN
diff $BIN/cig_smok $TEST/generated/savina/cig_smok_ref
echo "Savina/Counter"
$CMD $SRC/examples/erlang/savina/count.erl -v all -I include -o $BIN
diff $BIN/count $TEST/generated/savina/count_ref
echo "Savina/Fibonacci"
$CMD $SRC/examples/erlang/savina/fib.erl -v all -I include -o $BIN
diff $BIN/fib $TEST/generated/savina/fib_ref
echo "Savina/Fibonacci (Pairs)"
$CMD $SRC/examples/erlang/savina/fib_pairs.erl -v all -I include -o $BIN
diff $BIN/fib_pairs $TEST/generated/savina/fib_pairs_ref
echo "Savina/KFork"
$CMD $SRC/examples/erlang/savina/kfork.erl -v all -I include -o $BIN
diff $BIN/kfork $TEST/generated/savina/kfork_ref
echo "Savina/Dining philosophers"
$CMD $SRC/examples/erlang/savina/philosopher.erl -v all -I include -o $BIN
diff $BIN/philosopher $TEST/generated/savina/philosopher_ref
echo "Savina/Ping pong"
$CMD $SRC/examples/erlang/savina/ping_pong.erl -v all -I include -o $BIN
diff $BIN/ping_pong $TEST/generated/savina/ping_pong_ref
echo "Savina/Ping pong (Strict)"
$CMD $SRC/examples/erlang/savina/ping_pong_strict.erl -v all -I include -o $BIN
diff $BIN/ping_pong_strict $TEST/generated/savina/ping_pong_strict_ref
echo "Savina/Thread ring"
$CMD $SRC/examples/erlang/savina/thread_ring.erl -v all -I include -o $BIN
diff $BIN/thread_ring $TEST/generated/savina/thread_ring_ref