use only solve in polynomial time without correctness #125
Workflow file for this run
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: Demo | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
types: ["opened", "synchronize", "reopened"] | |
permissions: | |
contents: read | |
env: | |
otp: 26.0 | |
rebar3: 3.22.1 | |
jobs: | |
demo: | |
runs-on: ubuntu-22.04 | |
defaults: | |
run: | |
working-directory: ./demo | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: erlef/setup-beam@v1 | |
with: | |
otp-version: ${{ env.otp }} | |
rebar3-version: ${{ env.rebar3 }} | |
- name: Demonstrate | |
run: | | |
mkdir _checkouts | |
ln -s ${PWD}/../ _checkouts/bean | |
rebar3 bean | |
# NOTE: | |
# The processing of the following three commands can be achieved | |
# in some environments with the command | |
# `[ $(rebar3 shell --script run.escript | grep 'Result: 55' | wc -l) -eq 2 ]` alone. | |
# However, when the command are executed in GitHub Actions, | |
# the evaluation of `supervisor:start_link(bean, [])` causes a "Terminating erlang" error. | |
# The cause of this problem seems to depend on | |
# whether or not the Erlang runtime system is started with a shell | |
# (i.e., with or without `-noshell` at startup). | |
# Unfortunately, this option is currently not supported by Rebar3, | |
# so I used `erl` directly to solve this problem. | |
rebar3 compile | |
erlc run.erl | |
[ $(erl -pa _build/default/lib/demo/ebin -run run main -noshell | grep 'Result: 55' | wc -l) -eq 2 ] |