-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (63 loc) · 2.34 KB
/
manual-build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: "[M] Build"
on:
workflow_dispatch:
inputs:
java-version:
description: 'Java Version (e.g. 11, 17, etc.)'
required: true
default: '11'
java-distribution:
description: 'Java Distribution (temurin, zulu, adopt, adopt-openj9, liberica, microsoft, corretto)'
required: true
default: 'temurin'
scala-version:
description: 'Scala Version'
required: true
default: '3.1.3'
scala-binary-version:
description: 'Scala Binary Version (e.g. 2.13) - Make sure it matches with Scala Version above'
required: true
default: '3'
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
scala:
- {
name: "Scala",
version: "${{ github.event.inputs.scala-version }}",
binary-version: "${{ github.event.inputs.scala-binary-version }}",
java-version: "${{ github.event.inputs.java-version }}",
java-distribution: "${{ github.event.inputs.java-distribution }}"
}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: ${{ matrix.scala.java-version }}
distribution: ${{ matrix.scala.java-distribution }}
- name: Cache SBT
uses: actions/cache@v4
with:
path: |
~/.ivy2/cache
~/.cache/coursier
~/.sbt
key: ${{ runner.os }}-sbt-${{ matrix.scala.binary-version }}-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('**/build.properties') }}
restore-keys: |
${{ runner.os }}-sbt-${{ matrix.scala.binary-version }}-
- name: "Build All for ${{ matrix.scala.name }} - ${{ matrix.scala.version }} - ${{ github.run_number }}"
env:
CURRENT_BRANCH_NAME: ${{ github.ref }}
RUN_ID: ${{ github.run_id }}
RUN_NUMBER: ${{ github.run_number }}
run: |
export CURRENT_BRANCH_NAME="${CURRENT_BRANCH_NAME#refs/heads/}"
echo "[BEFORE]CURRENT_BRANCH_NAME=${CURRENT_BRANCH_NAME}"
echo " [AFTER]CURRENT_BRANCH_NAME=${CURRENT_BRANCH_NAME}"
echo "RUN_ID=${RUN_ID}"
echo "RUN_NUMBER=${RUN_NUMBER}"
echo "Push #${PUSH_NUMBER}"
java -version
.github/workflows/sbt-build-all.sh ${{ matrix.scala.version }}