Skip to content

Commit a237ef7

Browse files
authored
fix CI build to use packages from the repository (#87)
The build workflow would setup the package catalog as current user, but run the build as root using sudo. This meant that the build used a different package catalog and plot packages were retrieved from the package catalog, instead of being locally build, effectively defeating the CI process. This probably worked in the original setup because all commands were run as "root", but broke when updating to setup-racket 0.10. Updated the CI workflow to run all racket commands as the current user and also updated setup-racket to 1.1 and Racket fto 8.0
1 parent e61eff8 commit a237ef7

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

.github/workflows/ci.yml

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,44 +9,46 @@ jobs:
99
# the failure is specific to a Racket version.
1010
fail-fast: false
1111
matrix:
12-
racket-version: ["7.9", "current"]
13-
racket-variant: ["regular", "CS"]
12+
racket-version: ["8.0", "current"]
13+
racket-variant: ["BC", "CS"]
1414
steps:
1515
- uses: actions/checkout@v2
16-
- uses: Bogdanp/setup-racket@v0.10
16+
- uses: Bogdanp/setup-racket@v1.1
1717
with:
1818
architecture: x64
1919
distribution: minimal
2020
variant: ${{ matrix.racket-variant }}
2121
version: ${{ matrix.racket-version }}
22+
dest: '${HOME}/racket'
23+
sudo: never
2224

2325
# Setup this source repository as a package catalog which has higher
2426
# priority than the main catalog
2527

26-
- run: racket -l- pkg/dirs-catalog --link catalog .
28+
- run: ${HOME}/racket/bin/racket -l- pkg/dirs-catalog --link catalog .
2729
- run: echo "file://`pwd`/catalog" > catalogs.txt
28-
- run: raco pkg config catalogs >> catalogs.txt
29-
- run: raco pkg config --set catalogs `cat catalogs.txt`
30-
- run: raco pkg config catalogs
30+
- run: ${HOME}/racket/bin/raco pkg config catalogs >> catalogs.txt
31+
- run: ${HOME}/racket/bin/raco pkg config --set catalogs `cat catalogs.txt`
32+
- run: ${HOME}/racket/bin/raco pkg config catalogs
3133

3234
# Install plot and its dependencies. Since we installed minimal racket,
3335
# this will fetch most of the packages from the main package catalog,
3436
# except for the packages inside this directory, which have higher
3537
# priority.
3638

37-
- run: sudo raco pkg install --batch --auto plot
39+
- run: ${HOME}/racket/bin/raco pkg install --batch --auto plot
3840

3941
# This runs any tests inside the plot, plot-lib, plot-gui-lib and
4042
# plot-doc packages, but NOT the plot-test package. The actual tests
4143
# are in the `plot-test` package, so we don't expect any tests here, but
4244
# just in case someone wrote a test module...
4345

44-
- run: sudo xvfb-run raco test --deps --package plot
46+
- run: xvfb-run ${HOME}/racket/bin/raco test --deps --package plot
4547

4648
# Install the plot-test package and run the tests
4749

48-
- run: sudo raco pkg install --batch --auto plot-test
49-
- run: sudo xvfb-run raco test --package plot-test
50+
- run: ${HOME}/racket/bin/raco pkg install --batch --auto plot-test
51+
- run: xvfb-run ${HOME}/racket/bin/raco test --package plot-test
5052

5153
# If any of the plot-test tests failed, they will generate new draw step
5254
# files and sample images. Upload these as an Github Actions Artifact,

0 commit comments

Comments
 (0)