Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
Quafadas committed May 20, 2024
1 parent 46a22eb commit 9ae494d
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 7 deletions.
3 changes: 2 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
// //, "ghcr.io/devcontainers-contrib/features/scalacli-sdkman:2": {}
},

"onCreateCommand": "mill -j 0 __.prepareOffline && mill -j 0 __.compile && mill mill.bsp.BSP/install"
// Try do do as much as possible in the image, so that the container starts up quickly
"onCreateCommand": "mill -j 0 __.prepareOffline && mill -j 0 __.compile && mill mill.bsp.BSP/install && mill --import ivy:com.lihaoyi::mill-contrib-bloop: mill.contrib.bloop.Bloop/install"

// // Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
Expand Down
4 changes: 2 additions & 2 deletions .devcontainer/features/mill/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"id": "mill",
"version": "1.0.0",
"name": "Mill Build Tool",
"description": "Installs Mill, a Scala build tool.",
"name": "Mill, Coursier, Metals",
"description": "Some OSS scala utils",
"installsAfter": [
"ghcr.io/devcontainers/features/java:1"
],
Expand Down
9 changes: 7 additions & 2 deletions .devcontainer/features/mill/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

set -e

# Install Mill
# Put millw on the path, so we can call 'mill' from the command line.
curl -L -o /usr/local/bin/mill https://raw.githubusercontent.com/lefou/millw/0.4.11/millw && chmod +x /usr/local/bin/mill
curl -fL "https://github.com/coursier/launchers/raw/master/cs-x86_64-pc-linux.gz" | gzip -d > /usr/local/bin/cs && chmod +x /usr/local/bin/cs

# Install Coursier - can call cs from command line
curl -fL "https://github.com/coursier/launchers/raw/master/cs-x86_64-pc-linux.gz" | gzip -d > /usr/local/bin/cs && chmod +x /usr/local/bin/cs

# Install metals - should prevent dependancy downloads on container start
cs install metals
5 changes: 3 additions & 2 deletions .github/workflows/container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,6 @@ jobs:
# Change this to be your CI task/script
runCmd: |
# Add multiple commands to run if needed
./mill -v
./mill __.compile
cs version
mill -v
mill __.compile

0 comments on commit 9ae494d

Please sign in to comment.