Merge pull request #36 from mattpolzin/modernize #106
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: ncurses-idris tests | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
# schedule: | |
# - cron: '0 1 * * *' | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
container: mattpolzin2/idris-docker:nightly | |
env: | |
IDRIS2_CG: chez | |
NCURSES_VERSION: 6 | |
steps: | |
- name: Install Dependencies | |
run: apt-get update && apt-get -y install git libncurses-dev libc6-dev | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Build ncurses-idris | |
run: make && make install | |
- name: Build doc example | |
run: | | |
cd examples/doc_ann | |
make | |
cd - | |
- name: Build control example | |
run: | | |
cd examples/control_curses | |
make | |
cd - | |
- name: Build ticker example | |
run: | | |
cd examples/control_curses_ticker | |
make | |
cd - | |
- name: Build pumpkin example | |
run: | | |
cd examples/control_pumpkin | |
make | |
cd - | |
- name: Build borders example | |
run: | | |
cd examples/control_bordered | |
make | |
cd - | |
- name: Build stateful example | |
run: | | |
cd examples/control_stateful | |
make | |
cd - | |
- name: Build in window example | |
run: | | |
cd examples/control_in_window | |
make | |
cd - | |
- name: Build key logger example | |
run: | | |
cd examples/key_logger | |
make | |
cd - | |
- name: Build snake example | |
run: | | |
cd examples/snake | |
make | |
cd - | |
- name: Build tetris example | |
run: | | |
cd examples/tetris | |
make | |
cd - | |
- name: Build timed example | |
run: | | |
cd examples/timed | |
make | |
# I would like to run this here, but it fails in GitHub CI which I assume | |
# is somehow because the terminal can't support ncurses. | |
# ./build/exec/timed | |
# Instead, let's just check for some of the artifacts in the right locations: | |
if [[ ! -d "./depends/ncurses-idris-0/lib" ]]; then | |
echo 'depends or lib dir missing.' | |
exit 1 | |
fi | |
if [[ ! -f "./depends/ncurses-idris-0/lib/libncurses-idris.so" ]]; then | |
echo 'libncurses-idris.so missing for depends.' | |
exit 1 | |
fi | |
if [[ ! -f "./depends/ncurses-idris-0/NCurses.ttc" ]]; then | |
echo 'TTC files missing.' | |
exit 1 | |
fi | |
if [[ ! -f "./build/exec/timed_app/libncurses-idris.so" ]]; then | |
echo 'libncurses-idris.so missing for build dir.' | |
exit 1 | |
fi | |
cd - |