Skip to content

Commit

Permalink
Add GitHub Actions workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
dlozeve committed Oct 23, 2021
1 parent 10c392d commit 5ae7ccc
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/scripts/install-gambit.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/env bash

if [ ! -f $HOME/gambit/bin/gsi ]; then
wget http://www.iro.umontreal.ca/~gambit/download/gambit/v4.9/source/gambit-v4_9_3.tgz
tar xzvf gambit-v4_9_3.tgz
pushd gambit-v4_9_3
./configure --prefix=$HOME/gambit --enable-single-host
make
make install
popd
fi

sudo ln -sf $HOME/gambit/bin/gsi /bin/gsi
sudo ln -sf $HOME/gambit/bin/gsi-script /bin/gsi-script
sudo ln -sf $HOME/gambit/bin/gsc /bin/gsc
36 changes: 36 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: CI
on: [push, pull_request]
jobs:
install-gambit:
runs-on: ubuntu-latest
steps:
- name: Install dependencies
run: sudo apt-get -y install openssl libssl-dev sqlite3 libsqlite3-dev
- name: Install Gambit
run: ./.github/scripts/install-gambit.sh
- name: Cache gambit
uses: actions/cache@v2
env:
cache-name: gambit
with:
path: $HOME/gambit
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('$HOME/gambit/bin/gsi') }}
build-test:
runs-on: ubuntu-latest
needs: install-gambit
steps:
- uses: actions/checkout@v2
- name: Build
run: |
echo "(define (gerbil-version-string) \"git-$(git rev-parse --short=8 HEAD)\")" > src/gerbil/runtime/gx-version.scm
export GERBIL_HOME=${GITHUB_WORKSPACE}
cd src
./build.sh gxi
./build.sh stage0
./build.sh stage1 final
./build.sh stdlib
./build.sh lang
./build.sh tools
export PATH=${GITHUB_WORKSPACE}/bin:$PATH
- name: Run tests
run: ./std/run-tests.ss

0 comments on commit 5ae7ccc

Please sign in to comment.