Sfoglia il codice sorgente

Add a second nightly build. Does not product artifacts. Can be seen active at https://github.com/martijnlaan/issrc-build-env/actions/workflows/build2.yml, which uses Delphi 10.4.

Martijn Laan 4 mesi fa
parent
commit
5670bfd30e
2 ha cambiato i file con 48 aggiunte e 0 eliminazioni
  1. 43 0
      .github/workflows/build2.yml
  2. 5 0
      README.md

+ 43 - 0
.github/workflows/build2.yml

@@ -0,0 +1,43 @@
+name: build2
+
+on:
+  push:
+  workflow_dispatch:
+
+env:
+  HOME: "${{github.workspace}}\\home"
+
+jobs:
+  build2:
+    # Only set the topic `has-issrc-build2-env` if the secrets are available
+    if: contains(github.event.repository.topics, 'has-issrc-build2-env')
+    runs-on: windows-latest
+    steps:
+      - uses: actions/checkout@v3
+        with:
+          submodules: true
+      - name: Initialize build environment
+        env:
+          ISSRC_BUILD2_ENV_ZIP_PASSWORD: ${{ secrets.ISSRC_BUILD2_ENV_ZIP_PASSWORD }}
+          ISSRC_BUILD2_ENV_ZIP_URL: ${{ secrets.ISSRC_BUILD2_ENV_ZIP_URL }}
+        run: |
+          (New-Object Net.WebClient).DownloadFile($env:ISSRC_BUILD2_ENV_ZIP_URL, "issrc-build-env.zip")
+          & "C:\\Program Files\\7-Zip\\7z.exe" x -oissrc-build-env -p"$env:ISSRC_BUILD2_ENV_ZIP_PASSWORD" issrc-build-env.zip
+          if (!(Test-Path issrc-build-env\bin\dcc32.exe)) {
+            Write-Host "Failed to extract dcc32.exe"
+            Exit 1
+          }
+          Remove-Item issrc-build-env.zip
+          $DELPHIXEROOT = (Get-Item .\issrc-build-env).FullName
+          "DELPHIXEROOT=$DELPHIXEROOT" | Out-File -NoNewLine -Encoding ascii -Append "$env:GITHUB_ENV"
+      - name: Build issrc
+        run: |
+          "set DELPHIXEROOT=$env:DELPHIXEROOT" | Out-File -Encoding ascii compilesettings.bat
+          "set ISSIGTOOL_KEY_FILE=${{github.workspace}}\mykey.isprivatekey" | Out-File -NoNewline -Encoding ascii -Append compilesettings.bat
+          "set DELPHIXEROOT=$env:DELPHIXEROOT" | Out-File -NoNewline -Encoding ascii ISHelp\ISHelpGen\compilesettings.bat
+          "set HHCEXE=%ProgramFiles(x86)%\HTML Help Workshop\hhc.exe" | Out-File -NoNewline -Encoding ascii ISHelp\compilesettings.bat
+          .\build.bat
+      - name: Clean up temporary files
+        if: always()
+        shell: bash
+        run: rm -rf mykey.isprivatekey

+ 5 - 0
README.md

@@ -285,6 +285,11 @@ the name `ISSRC_BUILD_ENV_SYNC_TOKEN`. Finally, indicate that your fork has this
 by adding the topic `has-issrc-build-env-sync-token`. Your fork will now synchronize daily,
 by adding the topic `has-issrc-build-env-sync-token`. Your fork will now synchronize daily,
 and will automatically run the aforementioned build workflow on changes, if it's configured.
 and will automatically run the aforementioned build workflow on changes, if it's configured.
 
 
+To perform a second unattended build using a different Delphi version, add topic
+`has-issrc-build2-env` and secrets `ISSRC_BUILD2_ENV_ZIP_URL` and
+`ISSRC_BUILD2_ENV_ZIP_PASSWORD`. Unlike the main build, the second build does not produce
+any artifacts.
+
 <!-- Link references -->
 <!-- Link references -->
 [CONTRIBUTING.md]: <CONTRIBUTING.md>
 [CONTRIBUTING.md]: <CONTRIBUTING.md>
 [Projects\Bin]: <Projects/Bin>
 [Projects\Bin]: <Projects/Bin>