-
Notifications
You must be signed in to change notification settings - Fork 7
98 lines (91 loc) · 4.52 KB
/
buildExecuteCustom-B.yaml
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
name: "Open CB: custom/manual builds B"
run-name: ${{ inputs.build-name != '' && inputs.build-name || format('Scala {0} @ {1} / {2} {3}{4}', inputs.published-scala-version != '' && inputs.published-scala-version || 'snapshot', inputs.repository-url, inputs.repository-branch, inputs.extra-scalac-options != '' && format('extraScalacOptions={0} ', inputs.extra-scalac-options) || '', inputs.disabled-scalac-options != '' && format('disabledScalacOptions={0}', inputs.disabled-scalac-options) || '' ) }}
on:
workflow_dispatch:
inputs:
build-name:
type: string
description: "Custom name of the job in GitHub Actions"
default: ""
published-scala-version:
type: string
description: "Published Scala version to use, if empty new version of compiler would be build with default name based on the selected repository"
repository-url:
type: string
description: "GitHub repository URL for compiler to build, ignored when published-scala-version is defined"
default: "lampepfl/dotty"
repository-branch:
type: string
description: "GitHub repository branch for compiler to build, ignored when published-scala-version is defined"
default: "main"
extra-scalac-options:
type: string
description: "List of scalacOptions which should be used when building projects. Multiple entires should be seperated by a single comma character `,` (Best effort)"
default: ""
disabled-scalac-options:
type: string
description: "List of scalacOptions which should be filtered out when building projects. (Best effort)"
default: ""
extra-library-dependencies:
type: string
description: "List of library dependencies which should be injected when building projects, in format org:artifact:version, or org::artifact:version for Scala cross version. Multiple entires should be seperated by a single semicolon character `;`. (Best effort)"
default: ""
push-to-gh-pages:
type: boolean
description: "Should the workflow push the generated raport to gh-pages branch"
default: false
jobs:
# Name of this job need to match inputs of build-project/job-info
execute-build-plan:
uses: ./.github/workflows/buildPlan-B.yaml
with:
published-scala-version: ${{ inputs.published-scala-version }}
repository-url: ${{ inputs.repository-url }}
repository-branch: ${{ inputs.repository-branch }}
extra-scalac-options: ${{ inputs.extra-scalac-options }}
disabled-scalac-options: ${{ inputs.disabled-scalac-options }}
extra-library-dependencies: ${{ inputs.extra-library-dependencies }}
custom-build-id: ${{ inputs.build-name }}
secrets: inherit
create-raport:
needs: [execute-build-plan]
runs-on: ubuntu-22.04
continue-on-error: true
steps:
- name: Git Checkout
uses: actions/checkout@v4
- name: Install coursier
uses: coursier/setup-action@v1
with:
apps: scala-cli:1.0.4
- name: Generate raport
env:
ES_USER: ${{ secrets.OPENCB_ELASTIC_USER }}
ES_PASSWORD: ${{ secrets.OPENCB_ELASTIC_PSWD }}
run: |
scalaVersion=${{ needs.execute-build-plan.outputs.used-scala-version }}
lastRC="$(./scripts/lastVersionRC.sc)"
lastStable=$(./scripts/lastVersionStable.sc)
FOR_HTML=1 scala-cli scripts/raport-regressions.scala -- $scalaVersion > raport-full.rendered.md
scala-cli scripts/raport-regressions.scala -- $scalaVersion | tee raport-full.md
scala-cli scripts/raport-regressions.scala -- $scalaVersion --compareWith=$lastRC > raport-compare-$lastRC.md
scala-cli scripts/raport-regressions.scala -- $scalaVersion --compareWith=$lastStable > raport-compare-$lastStable.md
- name: Upload raports
uses: actions/upload-artifact@v3
with:
name: build-raports
path: ${{ github.workspace }}/raport-*.md
- uses: tibdex/github-app-token@v1
if: ${{ inputs.push-to-gh-pages }}
id: generate-token
with:
app_id: 303718
private_key: ${{ secrets.OPENCB_CONFIG_UPDATE_TOKEN }}
- name: Push raport
if: ${{ inputs.push-to-gh-pages }}
uses: ./.github/actions/push-raport-to-gh-pages
with:
artifact-name: build-raports
file-to-pick: raport-full.rendered.md
build-title: ${{ needs.execute-build-plan.outputs.used-scala-version }}
token: ${{ steps.generate-token.outputs.token }}