Compare commits

...

80 Commits
v0.3 ... master

Author SHA1 Message Date
Greg Hendershott
1d7ced666d Fix README link 2020-12-18 15:14:24 -05:00
Greg Hendershott
1ea37ca479 More deprecation 2020-11-26 08:34:45 -05:00
Greg Hendershott
b86c9bc228 Start to deprecate 2020-11-25 17:13:24 -05:00
Greg Hendershott
de55d4ca02 Add 7.9 to test.sh and example/.travis.yml
Also add CS=1 example.
2020-11-12 11:11:31 -05:00
Greg Hendershott
e0f64b5027 Remove redundant tests 2020-08-13 14:08:04 -04:00
Greg Hendershott
e290db2a0a "HEAD" now defaults to CS
Add "HEADBC" to get BC.
2020-08-13 14:07:18 -04:00
Greg Hendershott
75751ba27d Add 7.8 to test.sh 2020-08-04 10:49:53 -04:00
Greg Hendershott
5a25c56f14 Add 7.6 and 7.7 to test.sh 2020-05-03 08:32:24 -04:00
Greg Hendershott
d2fb870328 Add Racket 7.7 2020-05-03 08:30:02 -04:00
Greg Hendershott
e526dfb240 Require Racket 6.3
See <https://github.com/racket/racket/pull/3084>.
2020-05-03 08:29:22 -04:00
Greg Hendershott
c6d518b436 Add Racket 7.6 to example/.travis.yml 2020-02-14 17:05:42 -05:00
Greg Hendershott
d20f540a36 Use Utah for snapshot a.k.a. HEAD builds.
NWU doesn't seem to be building Linux at the moment.
2020-01-09 15:46:28 -05:00
Greg Hendershott
15710901e0 Reorder tests from old to new
Also make sure we exercise HEAD and HEADCS for newer.
2020-01-09 15:39:30 -05:00
Greg Hendershott
39b78abdc7 Tweak output for curl HEAD request check of installer URL 2019-11-25 15:54:35 -05:00
Greg Hendershott
439d472ab0 Edit comment about #!/bin/bash 2019-11-25 15:30:55 -05:00
Greg Hendershott
1dead206fb Add editorial/explanation comment to install-racket.sh 2019-11-25 15:23:47 -05:00
Greg Hendershott
7cacf1b480 Various README edits 2019-11-25 14:13:03 -05:00
Greg Hendershott
3aa473a578 Also shellcheck test.sh 2019-11-25 13:43:47 -05:00
Greg Hendershott
20b0d96bc4 Add explicit error checking 2019-11-25 13:43:30 -05:00
Greg Hendershott
960ebda600 Distinguish our own .travis.yml and example/.travis.yml
As a result, our own .travis.yml can focus on testing
install-racket.sh as of the current commit.

(I am still using test.sh and `for` loops. It's not immediately
obvious to me how to express that instead using a Travis job matrix --
or that doing so would be any clearer.)
2019-11-25 13:30:53 -05:00
Greg Hendershott
f2ee38346a Improve comment for main.rkt 2019-11-25 11:30:02 -05:00
Greg Hendershott
abc3d6b6b9 Run shellcheck in test.sh 2019-11-25 11:29:51 -05:00
Greg Hendershott
18eb8fadae Use bash <(curl raw.githubusercontent.com)
As I've started to do in my own projects' .travis.yml files.
2019-11-25 11:27:18 -05:00
Greg Hendershott
2211272c92 shellcheck suggested changes to install-racket.sh 2019-11-25 11:22:14 -05:00
Greg Hendershott
2945afacf9 Add Racket 7.5 to matrix in example .travis.yml 2019-11-20 12:46:44 -05:00
Greg Hendershott
2cc8138f53 Enhance test.sh to exercise all "flavor" permutations 2019-10-24 11:51:33 -04:00
Greg Hendershott
b438731ab3 Add RACKET_CS "flavor"; closes #37 2019-10-24 11:42:16 -04:00
Greg Hendershott
523825f1ac Add FUNDING.yml 2019-10-24 11:09:40 -04:00
Greg Hendershott
7048c12edf Update through 7.4 2019-10-24 11:07:14 -04:00
Greg Hendershott
9d5eeb5574 Add RELEASECS 2019-07-23 17:01:15 -04:00
Greg Hendershott
f741bd159b Update test.sh for recent versions and for RELEASECS 2019-07-23 17:00:55 -04:00
Ethan Estrada
c30155c015 Use shallow git clone instead of full git clone 2019-07-02 09:57:22 -04:00
Greg Hendershott
e7739e0117 Improve comments for "HEAD", "HEADCS", and "RELEASE"; closes #34 2019-06-07 20:13:36 -04:00
Greg Hendershott
73f9132b96 Update through 7.3 2019-06-07 20:08:26 -04:00
Matthew Butterick
07334c631d Add RACKET_NATIPKG 2019-04-27 09:34:05 -04:00
Greg Hendershott
23fe307ab6 Like 0d7c08f, but with less stupidity 2019-04-09 20:01:59 -04:00
Greg Hendershott
0d7c08f803 Change DL_BASE to https://www.cs.utah.edu/plt/installers
Intermittent outages at mirror.racket-lang.org yesterday and still
ongoing today. downloads.racket-lang.org changed this default, so I'm
doing same. Can change back later, if/as/when they do.
2019-04-09 19:51:57 -04:00
Greg Hendershott
30d4cda100 Add HEADCS to allow_failures just like HEAD and RELEASE 2018-11-29 21:32:05 -05:00
Philip McGrath
892c664cb5 Remove deprecated sudo: false.
Per https://blog.travis-ci.com/2018-11-19-required-linux-infrastructure-migration
and https://blog.travis-ci.com/2018-10-04-combining-linux-infrastructures,
Travis CI is eliminating its container-based infrastructure
and deprecating the `sudo` keyword.

Also add 7.1 to build matrix.
2018-11-29 16:32:49 -05:00
Philip McGrath
4779de7966 Add "HEADCS" for Racket-on-Chez snapshots 2018-11-19 08:16:24 -05:00
Philip McGrath
92344e09ae Use https for pre-release.racket-lang.org 2018-10-27 23:53:02 -04:00
Dan Liebgold
85b939a890 Use https for plt.eecs HEAD 2018-10-04 11:16:08 -04:00
Greg Hendershott
1078bc76be Update install-racket.sh for 7.*
Also: Update test.sh and the example .travis.yml through Racket 7.0.
2018-07-28 09:50:28 -04:00
Greg Hendershott
76ba0c7795 Update test.sh through Racket 6.10 2017-08-08 17:45:26 -04:00
Spencer Florence
1df1d73d94 give a better error message on missing installer (#21) 2017-08-08 17:41:08 -04:00
Greg Hendershott
d4440963a8 Update example .travis.yml through Racket 6.10 2017-08-01 15:11:08 -04:00
Erik Silkensen
2f4fb6af85 Update for 6.10+ installer URLs (#20)
* Update for 6.10+ installer URLs, fixes #19
2017-08-01 15:08:35 -04:00
Greg Hendershott
daf965ac9c Update Racket versions
Also update the commented-out example of packages:

- No need to `cd`; can run `raco pkg install` in the repo dir.

- Add a step to check the package deps.
2017-04-10 23:58:57 -04:00
Greg Hendershott
de009a9e0f Merge pull request #18 from zenspider/fix/minimal-on-master
Overhaul install-racket.sh and add test.sh to validate full matrix.
2016-08-24 09:21:09 -04:00
Ryan Davis
ca38aeef46 Removed SCOPE_SNAPSHOT from .travis.yml 2016-08-13 14:44:53 -07:00
Ryan Davis
67b38da25f Overhaul install-racket.sh and add test.sh to validate full matrix.
Namely, added test.sh to run through all the possible downloads and test for validity.

Added handler for TEST=1 in install-racket.sh.

Normalize urls as much as possible and to get minimal installs working
properly. This can probably be merged to master and drop the minimal
branch entirely.

I think there is still some cleanup that can happen. The various linux
flavors can probably be unified, if not parameterized.

This patch removes SCOPE_SNAPSHOT, as it seems to point to incredibly
stale content. RELEASE does too, but there is a note that it is only
valid during release phases.
2016-08-08 16:50:59 -07:00
Greg Hendershott
0a1d589cec Merge pull request #16 from gus-massa/16-7-Release
Update the URL of the RELEASE version
2016-07-09 12:13:28 -04:00
Gustavo Massaccesi
545b287d90 Update the URL of the RELEASE version 2016-07-09 09:56:47 -03:00
Greg Hendershott
a583ee4533 Merge pull request #15 from lexi-lambda/master
Update for 6.5 installer URLs
2016-05-03 09:35:45 -04:00
Alexis King
831a87d30a Update for 6.5 installer URLs
fixes #14
2016-05-03 00:30:40 -07:00
Greg Hendershott
5caea9af7f Use sudo: false in example .travis.yml
See issue #5
2016-01-17 13:43:44 -05:00
Gustavo Massaccesi
84415da65d Add support for pre-release snapshot 2015-10-20 22:13:20 -03:00
Greg Hendershott
5e4d017204 set-of-scopes: use new racket-current-x86_64-linux.sh 2015-06-29 10:46:39 -04:00
Greg Hendershott
4c77798b3c Add Racket 6.2 to matrix in example .travis.yml 2015-06-28 09:01:19 -04:00
Greg Hendershott
c86c9fc4dc Merge pull request #8 from AlexKnauth/scope-set
support testing with scope-set expander snapshot
2015-05-18 14:04:21 -04:00
AlexKnauth
132097327c support scope-snapshot 2015-05-17 23:45:59 -04:00
Greg Hendershott
fcf3929f0b Merge pull request #7 from lkuper/patch-1
Fix duplicate `matrix` entry in .travis.yml
2015-04-04 22:33:02 -04:00
Lindsey Kuper
4a74d649b4 Fix duplicate matrix entry in .travis.yml
Closes #6.
2015-04-04 17:23:53 -07:00
Greg Hendershott
c457a94d6d Add allow_failures and fast_finish. 2015-02-22 09:25:12 -05:00
Greg Hendershott
ebbc14e18b Support Travis CI containers. Fixes #5.
Change install-racket.sh to:

- Use a RACKET_DIR env var saying where to install Racket. For backwards
  compatibility, if undefined this defaults to /usr/racket.

- Don't use sudo unless installing to /usr*.

- Download nightly snapshot builds from Northwestern not Utah.
  See https://github.com/travis-ci/travis-ci/issues/3012

- Fix the here string (which was slightly broken all along, although in
  a way that had been harmless).

Change the example .travis.yml to:

- Split env into global and matrix sections.

- Specify RACKET_DIR as a global var.

- Specify the RACKET_VERSIONs as matrix vars.

- Set PATH from RACKET_DIR (because install-racket.sh can't do this --
  it can't change the env for the .travis.yml).
2015-01-12 22:07:23 -05:00
Greg Hendershott
bf386bbfc9 Add Racket 6.1.1 to example .travis.yml 2014-11-04 11:07:38 -05:00
Greg Hendershott
2aa8d0304b Add Racket 6.1 to matrix 2014-08-11 21:54:23 -04:00
Greg Hendershott
b50ec04d93 Change version 6 regexp 2014-08-11 21:51:30 -04:00
Greg Hendershott
dceb7ddf35 Merge branch 'use-git-to-get-the-script' 2014-06-06 18:52:51 -04:00
Greg Hendershott
e8fd95654e Use https not ssh URL 2014-06-06 14:52:14 -04:00
Greg Hendershott
9fc629c3cc Try getting install-racket.sh using git clone instead of curl
History/background:

1. Originally, used curl with raw.github.com to get the latest version
of install-racket.sh.

2. But GitHub discourages using raw.github.com. So switched to using the
GitHub "releases" feature to make install-racket.sh available. But
that's a PITA: (a) Need to make each release, and furthermore (b)
there's no URL meaning "the latest version of the file to be
downloaded" for the .travis.yml scripts to use, so they tediously need
to be updated to fetch using the new URL for the new version.

3. OK, so now -- how about simply cloning the GitHub repo locally, and
using the travis-racket.sh from that (which of course will be the latest
version).
2014-06-06 14:42:57 -04:00
Greg Hendershott
0beb408b61 Switch example back to using release not raw. 2014-03-13 16:42:25 -04:00
Greg Hendershott
e1d8cbf061 Use -L with curl for download of Racket installer.
To follow redirects, if any.
2014-03-13 16:29:43 -04:00
Greg Hendershott
1216a31b49 Switch example back to using release not raw. 2014-02-27 09:45:27 -05:00
Greg Hendershott
c1fb2a8612 README bash not sh 2014-02-27 09:40:14 -05:00
Greg Hendershott
aff762e0f0 Pipe to bash not sh
Script uses some "advanced" bash capabilities.
2014-02-27 09:35:52 -05:00
Greg Hendershott
d29ac874cc Support Racket 5.9x and 6.0. 2014-02-27 09:10:25 -05:00
Greg Hendershott
af60d70904 Switch example back to using release not raw. 2014-01-28 15:13:45 -05:00
Greg Hendershott
e943dff124 Special case 5.92 2014-01-28 15:07:46 -05:00
Greg Hendershott
118ab5468b Update .travis.yml with example for Racket packages. 2013-11-08 16:52:00 -05:00
6 changed files with 277 additions and 66 deletions

View File

@ -1,31 +1,13 @@
# IMPORTANT:
#
# This is NOT an example of a .travis.yml you would use in your own
# Racket project -- for that, see example/.travis.yml.
#
# Instead, this is used by this repo to test install-racket.sh.
language: c
# Supply at least one RACKET_VERSION environment variable definition
# here. RACKET_VERSION is used by the install-racket.sh script
# (specifed below under before_install) to select the version of
# Racket to download and install.
#
# If you supply more than one, you can create multiple builds (a
# Travis-CI build matrix resulting in multiple builds). You can use
# this to test against multiple Racket versions.
env:
- RACKET_VERSION=5.3.4
- RACKET_VERSION=5.3.5
- RACKET_VERSION=HEAD
before_install:
- curl -L https://github.com/greghendershott/travis-racket/releases/download/v0.3/install-racket.sh | sh
install:
before_script:
# Here supply steps such as raco make, raco test, etc. Note that you
# need to supply /usr/racket/bin/ -- it's not in PATH. You can run
# `raco pkg install --deps search-auto <pkg>` to install any required
# packages without it getting stuck on a confirmation prompt.
script:
- /usr/racket/bin/raco make main.rkt
- /usr/racket/bin/raco test -x .
after_script:
- shellcheck install-racket.sh
- shellcheck test.sh
- ./test.sh

View File

@ -1,19 +1,40 @@
Experimenting with using Travis CI for a Racket project.
# Deprecated
Until Travis CI gets built-in support for Racket, we can use the
`before_install` clause of `.travis.yml` to download and run the
Racket installer.
As of 2020-11-25 I no longer use Travis CI for my projects.
> **CAVEAT**: This downloads the ~75MB Racket installer and runs it
> for **each and every** build! In other words, this is a hack. The
> un-hack would be (IIUC) to add a Travis CI "cookbook" for Racket.
Instead I am using
[`setup-racket`](https://github.com/Bogdanp/setup-racket) with GitHub
Actions.
To add this capability to your project, simply add the
[example `.travis.yml`](https://github.com/greghendershott/travis-racket/blob/master/.travis.yml)
to your repo. You may need to change its `script` section's `raco
make` and `raco test` parts.
After maintaining this repo for eight years, I'm glad to pass the
baton.
Here's a "badge" showing the status for the `master` branch of this
repo:
If you're willing and able to pay Travis CI, you might still find this
repo useful. You can fork it. Someday, when there is a new version of
Racket, you might need to update the `install-racket.sh` script (as I
would have done, but won't be doing anymore).
[![Build Status](https://travis-ci.org/greghendershott/travis-racket.png?branch=master)](https://travis-ci.org/greghendershott/travis-racket)
I'm not going to "Archive" this repo -- which would make it read-only
for issues and pull-requests -- right away. So if you have any
questions, feel feee to open an issue. But eventually I probably
will archive it.
# Still want to use this? Here's the old README
Until/unless Travis CI gets built-in support for Racket, we can use
the `install:` section of `.travis.yml` to download and run the
installer for various versions and variants of Racket.
To use in your project, simply add the [example
`.travis.yml`](example/.travis.yml) to the root of your repo.
> **NOTE:** Use `example/.travis.yml` --- *not* the one in the root of
> this repo, which is intended to test this repo not your project.
You may need to make some small edits to the file, as explained in its
comments. Specifically:
- You may want to change the `RACKET_VERSION` values, depending on
which versions of Racket you intend to support.
- You may need to change its `script:` section to suit your project.

79
example/.travis.yml Normal file
View File

@ -0,0 +1,79 @@
language: c
env:
global:
# Supply a global RACKET_DIR environment variable. This is where
# Racket will be installed. A good idea is to use ~/racket because
# that doesn't require sudo to install.
- RACKET_DIR=~/racket
matrix:
# Supply at least one RACKET_VERSION environment variable. This is
# used by the install-racket.sh script to select the version of
# Racket to download and install.
#
# Supply more than one RACKET_VERSION (as in the example below) to
# create a Travis-CI build matrix to test against multiple Racket
# versions.
- RACKET_VERSION=6.3
- RACKET_VERSION=6.4
- RACKET_VERSION=6.5
- RACKET_VERSION=6.6
- RACKET_VERSION=6.7
- RACKET_VERSION=6.8
- RACKET_VERSION=6.9
- RACKET_VERSION=6.10
- RACKET_VERSION=6.11
- RACKET_VERSION=6.12
- RACKET_VERSION=7.0
- RACKET_VERSION=7.1
- RACKET_VERSION=7.2
- RACKET_VERSION=7.3
- RACKET_VERSION=7.4
- RACKET_VERSION=7.5
- RACKET_VERSION=7.6
- RACKET_VERSION=7.7
- RACKET_VERSION=7.8
- RACKET_VERSION=7.9
- RACKET_VERSION=7.9 RACKET_CS=1
# "HEAD" is a daily snapshot built from the `master` branch.
# This is the main variant of Racket that uses its own runtime.
- RACKET_VERSION=HEAD
# "HEADCS" is a daily snapshot built from the `master` branch.
# This is an experimental variant of Racket that uses Chez Scheme.
- RACKET_VERSION=HEADCS
# "RELEASE" is a release candidate that updates only during the
# weeks before a new release. The final release candidate should
# remain available until the next release cycle. As a result, you
# may leave this in your .travis.yml all the time. See:
# <https://pre-release.racket-lang.org/>.
- RACKET_VERSION=RELEASE
matrix:
# You may want to test against certain versions of Racket, without
# having them count against the overall success/failure. For example
# here we include the development versions:
allow_failures:
- env: RACKET_VERSION=HEAD
- env: RACKET_VERSION=HEADCS
- env: RACKET_VERSION=RELEASE
# Fast finish: Overall build result is determined as soon as any of
# its rows have failed, or, all of its rows that aren't allowed to
# fail have succeeded.
fast_finish: true
install:
- bash <(curl https://raw.githubusercontent.com/greghendershott/travis-racket/master/install-racket.sh)
- export PATH="${RACKET_DIR}/bin:${PATH}" #install-racket.sh can't set for us
# Here supply steps such as raco make, raco test, etc.
script:
- raco make main.rkt
- raco test -x .
# OR: If your repo is a Racket package with an info.rkt that has any
# `deps`:
#
# script:
# - raco pkg install --deps search-auto
# - raco setup -D --check-pkg-deps <your-package-name>
# - raco test -x -p <your-package-name>

135
install-racket.sh Normal file → Executable file
View File

@ -1,22 +1,137 @@
#!/bin/bash
#
# In the Travis CI environment `#!/bin/bash` won't suffice (it's here
# to make shellcheck happy and for convenience when using this script
# locally).
#
# Instead .travis.yml should pipe this script to bash (not to sh).
set -e
if [ "$RACKET_VERSION" = "HEAD" ]; then
URL="http://www.cs.utah.edu/plt/snapshots/current/installers/racket-current-x86_64-linux-precise.sh"
if [[ "$RACKET_MINIMAL" = "1" ]]; then
MIN="minimal-"
else
URL="http://download.racket-lang.org/installers/${RACKET_VERSION}/racket/racket-${RACKET_VERSION}-bin-x86_64-linux-debian-squeeze.sh"
MIN=""
fi
INSTALL="./racket-${RACKET_VERSION}.sh"
if [[ "$RACKET_NATIPKG" = "1" ]]; then
RACKET_NATIPKG="-natipkg"
else
RACKET_NATIPKG=""
fi
echo "Downloading $URL to $INSTALL:"
curl -o $INSTALL $URL
if [[ "$RACKET_CS" = "1" ]]; then
RACKET_CS="-cs"
else
RACKET_CS=""
fi
echo "Running $INSTALL to install Racket:"
chmod u+rx "$INSTALL"
sudo "$INSTALL" <<EOF
# If this section seems like a mess, it is, because reasons:
#
# - The download URL naming conventions have changed over the years.
#
# - The Linux version name has changed over the years.
#
# - From time to time a Racket download server has gone offline, in
# which case this file has been "hot fixed". In the absence of any
# clear resolution signal ("you can resume using the original
# server"), the hot fix remains in place (until maybe someday it
# needs to be hot fixed).
#
# On the one hand, it sucks. On the other hand, a large part of the
# "added value" of this repo that it deals with the suckage so that
# ordinary users need not. They can supply names for Racket versions
# and variants using a consistent naming scheme, and we'll try to make
# it work.
DL_BASE="https://www.cs.utah.edu/plt/installers"
# In theory either NWU or Utah should work for downloading snapshot
# a.k.a. HEAD builds. In practice, it varies from time to time.
## HEAD_BASE="https://plt.eecs.northwestern.edu/snapshots/current"
HEAD_BASE="https://www.cs.utah.edu/plt/snapshots/current"
if [[ "$RACKET_VERSION" = "HEADBC" ]]; then
if [[ "$RACKET_MINIMAL" = "1" ]]; then
URL="${HEAD_BASE}/installers/racket-minimal-current-x86_64-linux-precise-bc.sh"
else
URL="${HEAD_BASE}/installers/racket-current-x86_64-linux-precise-bc.sh"
fi
elif [[ "$RACKET_VERSION" = "HEADCS" || "$RACKET_VERSION" = "HEAD" ]]; then
if [[ "$RACKET_MINIMAL" = "1" ]]; then
URL="${HEAD_BASE}/installers/racket-minimal-current-x86_64-linux-xenial.sh"
else
URL="${HEAD_BASE}/installers/racket-current-x86_64-linux-xenial.sh"
fi
elif [[ "$RACKET_VERSION" = 5.3* ]]; then
if [[ "$RACKET_MINIMAL" = "1" ]]; then
URL="${DL_BASE}/${RACKET_VERSION}/racket-textual/racket-textual-${RACKET_VERSION}-bin-x86_64-linux-debian-squeeze.sh"
else
URL="${DL_BASE}/${RACKET_VERSION}/racket/racket-${MIN}${RACKET_VERSION}-bin-x86_64-linux-debian-squeeze.sh"
fi
elif [[ "$RACKET_VERSION" = "RELEASE" ]]; then
URL="https://pre-release.racket-lang.org/installers/racket-${MIN}current-x86_64-linux${RACKET_NATIPKG}.sh"
elif [[ "$RACKET_VERSION" = "RELEASECS" ]]; then
URL="https://pre-release.racket-lang.org/installers/racket-${MIN}current-x86_64-linux${RACKET_NATIPKG}-cs.sh"
elif [[ "$RACKET_VERSION" = 5.9* ]]; then
URL="${DL_BASE}/${RACKET_VERSION}/racket-${MIN}${RACKET_VERSION}-x86_64-linux-ubuntu-quantal.sh"
elif [[ "$RACKET_VERSION" = 6.[0-4] ]] || [[ "$RACKET_VERSION" = 6.[0-4].[0-9] ]]; then
URL="${DL_BASE}/${RACKET_VERSION}/racket-${MIN}${RACKET_VERSION}-x86_64-linux-ubuntu-precise.sh"
elif [[ "$RACKET_VERSION" = 6.* ]]; then
URL="${DL_BASE}/${RACKET_VERSION}/racket-${MIN}${RACKET_VERSION}-x86_64-linux${RACKET_NATIPKG}.sh"
elif [[ "$RACKET_VERSION" = 7.* ]]; then
URL="${DL_BASE}/${RACKET_VERSION}/racket-${MIN}${RACKET_VERSION}-x86_64-linux${RACKET_NATIPKG}${RACKET_CS}.sh"
else
echo "ERROR: Unsupported version ${RACKET_VERSION}"
exit 1
fi
printf "%-25s" "${MIN}${RACKET_VERSION}${RACKET_NATIPKG}${RACKET_CS}"
echo "@ ${URL}"
if curl -I -L "$URL" 2>&1 | grep 404.Not.Found ; then
echo "Installer not available"
if [[ "$RACKET_VERSION" = "HEAD" ]]; then
echo "Did the build fail? Check the logs at ${HEAD_BASE}/log/"
fi
exit 1
fi
if [ -n "$TEST" ]; then
exit 0
fi
# Older .travis.yml files don't set $RACKET_DIR (the Racket install
# directory) explicitly and expect it to be /usr/racket.
if [[ "$RACKET_DIR" = "" ]]; then
RACKET_DIR=/usr/racket
fi
INSTALLER="./racket-${MIN}${RACKET_VERSION}.sh"
echo "Downloading $URL to $INSTALLER:"
curl -L -o "$INSTALLER" "$URL"
echo "Making $INSTALLER executable:"
chmod u+rx "$INSTALLER"
# Only use sudo if installing to /usr
if [[ "$RACKET_DIR" = /usr* ]]; then
RUN_INSTALLER="sudo ${INSTALLER}"
else
RUN_INSTALLER="${INSTALLER}"
fi
echo "Running $RUN_INSTALLER to install Racket:"
$RUN_INSTALLER <<EOF
no
/usr/racket
"$RACKET_DIR"
EOF
if [[ "$RACKET_MINIMAL" = "1" ]]; then
echo "Minimal Racket: Installing packages for raco test..."
${RACKET_DIR}/bin/raco pkg install --auto --scope installation rackunit-lib compiler-lib
fi
exit 0

View File

@ -1,14 +0,0 @@
#lang racket
;; A comment.
(define (plus1 x)
(add1 x))
(define (minus1 x)
(sub1 x))
(module+ test
(require rackunit)
(check-equal? (plus1 1) 2)
(check-equal? (minus1 1) 0))

28
test.sh Executable file
View File

@ -0,0 +1,28 @@
#!/bin/bash
# In older Racket versions, there is a "MINIMAL" "flavor".
for VER in 6.4 6.3 6.2 6.2.1 6.1 6.1.1 6.0 6.0.1 5.93 5.92 5.3 5.3.6 5.3.5 5.3.4 5.3.3 5.3.2 5.3.1 ; do
for MIN in 0 1; do
TEST=1 RACKET_MINIMAL=$MIN RACKET_VERSION=$VER ./install-racket.sh || exit 1
done
done
# Starting with Racket 6.5, there is also a "NATIPKG" flavor.
for VER in 7.3 7.2 7.1 7.0 6.12 6.11 6.10 6.9 6.8 6.7 6.6 6.5 ; do
for MIN in 0 1; do
for NAT in 0 1; do
TEST=1 RACKET_MINIMAL=$MIN RACKET_NATIPKG=$NAT RACKET_VERSION=$VER ./install-racket.sh || exit 1
done
done
done
# Starting with Racket 7.4, there is also a "CS" flavor.
for VER in HEAD HEADBC HEADCS 7.9 7.8 7.7 7.6 7.5 7.4 ; do
for MIN in 0 1; do
for NAT in 0 1; do
for CS in 0 1; do
TEST=1 RACKET_MINIMAL=$MIN RACKET_NATIPKG=$NAT RACKET_CS=$CS RACKET_VERSION=$VER ./install-racket.sh || exit 1
done
done
done
done