Skip to content

Commit

Permalink
Welcome to the Future, Part II (mighty-gerbils#777)
Browse files Browse the repository at this point in the history
* gambit submodule

* kill old configuration/installation artifacts

* kill build directories

* build with integrated gambit

* remove destdir check in build.sh

it goes into install, where it belongs

* configure, make, make install

what the user expects

* gitignore build-env.sh

* update CI worflows

* kill legacy script

* fix handling of gambit tags

* fix CI, more

* don't trigger autoconf

* make clean: first clean build artifacts and then clean gambit

* don't --enable-openssl by default

it causes problems... and we'll have the replacment soon.

* configure: use exact git version

* add a comment about why we need GERBIL_PREFIX

* add help to configure script

* reinstate -u script discipline.
  • Loading branch information
vyzo authored Sep 4, 2023
1 parent 19fb689 commit bf79e00
Show file tree
Hide file tree
Showing 34 changed files with 559 additions and 3,825 deletions.
15 changes: 0 additions & 15 deletions .github/scripts/install-gambit.sh

This file was deleted.

87 changes: 40 additions & 47 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,66 +6,59 @@ jobs:
strategy:
fail-fast: false # if one fails, do not cancel the other
matrix:
gambit-version: ['v4.9.5', 'v4.9.4', 'master']
gambit-version: ['v4.9.5', 'master']
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: sudo apt-get -y install openssl libssl-dev sqlite3 libsqlite3-dev
- uses: actions/checkout@v2
with:
repository: 'gambit/gambit'
ref: ${{ matrix.gambit-version }}
fetch-depth: 0 # Checkout history and tags
path: 'gambit-src'
if: steps.cache-gambit.outputs.cache-hit != 'true'
- name: Get Gambit version
id: get-gambit-version
run: |
cd gambit-src
echo "::set-output name=gambit-version::$(git rev-parse HEAD)"
shell: bash
- uses: actions/cache@v2
name: Cache gambit
id: cache-gambit
with:
path: 'gambit'
key: ${{ runner.os }}-gambit-${{ steps.get-gambit-version.outputs.gambit-version }}
- name: Build and install Gambit
if: ${{ !steps.cache-gambit.outputs.cache-hit }}
- name: Configure Gerbil
run: ./configure --prefix=/opt/gerbil --with-gambit=${{ matrix.gambit-version }}
- name: Create Gerbil version file
run: echo "(define (gerbil-version-string) \"git-$(git rev-parse --short=8 HEAD)\")" > src/gerbil/runtime/gx-version.scm
- name: Prepare Build
run: |
cd gambit-src
export LDFLAGS="-lm"
./configure 'LIBS=-lm' --prefix=${GITHUB_WORKSPACE}/gambit --enable-single-host --enable-targets=""
make clean
make
make install
- name: Setup links to Gambit executables
. ./build-env.sh
./src/build.sh prepare
- name: Build Gambit
run: |
sudo ln -sfv ${GITHUB_WORKSPACE}/gambit/bin/gsi /bin/gsi
sudo ln -sfv ${GITHUB_WORKSPACE}/gambit/bin/gsi-script /bin/gsi-script
sudo ln -sfv ${GITHUB_WORKSPACE}/gambit/bin/gsc /bin/gsc
gsi -v
gsi-script -v
gsc -v
- name: Setup Gerbil build
run: echo "(define (gerbil-version-string) \"git-$(git rev-parse --short=8 HEAD)\")" > src/gerbil/runtime/gx-version.scm
. ./build-env.sh
./src/build.sh gambit
- name: Build Gerbil boot gxi
run: ./src/build.sh boot-gxi
run: |
. ./build-env.sh
./src/build.sh boot-gxi
- name: Build Gerbil stage0
run: ./src/build.sh stage0
- name: Build Gerbil stage1 final
run: ./src/build.sh stage1 final
run: |
. ./build-env.sh
./src/build.sh stage0
- name: Build Gerbil stage1
run: |
. ./build-env.sh
./src/build.sh stage1
- name: Build Gerbil stdlib
run: ./src/build.sh stdlib
run: |
. ./build-env.sh
./src/build.sh stdlib
- name: Build Gerbil libgerbil
run: ./src/build.sh libgerbil
run: |
. ./build-env.sh
./src/build.sh libgerbil
- name: Build Gerbil lang
run: ./src/build.sh lang
run: |
. ./build-env.sh
./src/build.sh lang
- name: Build Gerbil r7rs-large
run: |
. ./build-env.sh
./src/build.sh r7rs-large
- name: Build Gerbil tools
run: ./src/build.sh tools
run: |
. ./build-env.sh
./src/build.sh tools
- name: Install Gerbil
run: ./install.sh
- name: Run Gerbil tests
run: |
export GERBIL_HOME=${GITHUB_WORKSPACE}
export PATH=${GITHUB_WORKSPACE}/bin:$PATH
export PATH=/opt/gerbil/bin:$PATH
gxtest src/gerbil/test/...
gxtest src/std/...
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ src/gerbil/runtime/gx-version.scm
src/gerbil/boot-gxi

build-deps
build-env.sh
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "src/gambit"]
path = src/gambit
url = https://github.com/gambit/gambit.git
12 changes: 12 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
default: build

build:
./build.sh

install:
./install.sh

clean:
rm -rf build
rm -rf bootstrap
cd src/gambit && make clean
82 changes: 0 additions & 82 deletions Makefile.in

This file was deleted.

Empty file removed bin/.keep
Empty file.
Empty file removed bootstrap/.keep
Empty file.
17 changes: 17 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/sh
set -e
cd $(dirname "$0")

die() {
echo "build failed"
exit 1
}

if [ -e build-env.sh ]; then
. ./build-env.sh
else
echo "build-env.sh does not exist; did you run configure?"
die
fi

(cd src && ./build.sh) || die
Loading

0 comments on commit bf79e00

Please sign in to comment.