Align unpickled Scala 2 accessors encoding with Scala 3 #30
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Open CB: custom/manual builds A" | |
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 `,`" | |
default: "" | |
disabled-scalac-options: | |
type: string | |
description: "List of scalacOptions which should be filtered out when building projects." | |
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-A.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 }} | |
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@v3 | |
- 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) | |
scala-cli scripts/raport-regressions.scala scripts/md_printer.scala -- $scalaVersion > raport-full.md | |
scala-cli scripts/raport-regressions.scala scripts/md_printer.scala -- $scalaVersion --compareWith=$lastRC > raport-compare-$lastRC.md | |
scala-cli scripts/raport-regressions.scala scripts/md_printer.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.md | |
build-title: ${{ needs.execute-build-plan.outputs.used-scala-version }} | |
token: ${{ steps.generate-token.outputs.token }} |