Skip to content

Commit

Permalink
Install Kotlin via SDKMAN! in CI workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
ethauvin committed Jul 13, 2024
1 parent b989f6f commit 3ea2a00
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 3 deletions.
10 changes: 10 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,16 @@ defaults: &defaults
defaults_bld: &defaults_bld
steps:
- checkout
- run:
name: Install Kotlin via SDKMAN!
command: |
curl -s "https://get.sdkman.io" | bash
echo sdkman_auto_answer=true > $HOME/.sdkman/etc/config
echo sdkman_auto_selfupdate=true >> $HOME/.sdkman/etc/config
source "$HOME/.sdkman/bin/sdkman-init.sh"
echo 'export SDKMAN_DIR="$HOME/.sdkman"' >> $BASH_ENV
echo 'source "$HOME/.sdkman/bin/sdkman-init.sh"' >> $BASH_ENV
sdk install kotlin 2.0.0
- run:
name: Download the bld dependencies
command: ./bld download
Expand Down
16 changes: 13 additions & 3 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,19 @@ variables:
stages:
- test

before_script:
- apt-get update -qq && apt-get install -y -qq unzip
- curl -s "https://get.sdkman.io" | bash
- echo sdkman_auto_answer=true > $HOME/.sdkman/etc/config
- echo sdkman_auto_selfupdate=true >> $HOME/.sdkman/etc/config
- source "$HOME/.sdkman/bin/sdkman-init.sh"
- echo 'export SDKMAN_DIR="$HOME/.sdkman"' >> $BASH_ENV
- echo 'source "$HOME/.sdkman/bin/sdkman-init.sh"' >> $BASH_ENV
- sdk install kotlin 2.0.0

test:
stage: test
script:
- ./bld download
- ./bld compile
- ./bld test
- ./bld download
- ./bld compile
- ./bld test
11 changes: 11 additions & 0 deletions bitbucket-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,17 @@ image: openjdk:17

pipelines:
default:
- step:
name: Install Kotlin via SDKMAN!
script:
- apt-get update -qq && apt-get install -y -qq unzip
- curl -s "https://get.sdkman.io" | bash
- echo sdkman_auto_answer=true > $HOME/.sdkman/etc/config
- echo sdkman_auto_selfupdate=true >> $HOME/.sdkman/etc/config
- source "$HOME/.sdkman/bin/sdkman-init.sh"
- echo 'export SDKMAN_DIR="$HOME/.sdkman"' >> $BASH_ENV
- echo 'source "$HOME/.sdkman/bin/sdkman-init.sh"' >> $BASH_ENV
- sdk install kotlin 2.0.0
- step:
name: Test with bld
script:
Expand Down

0 comments on commit 3ea2a00

Please sign in to comment.