diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6f2097338..daf83bfc3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -72,6 +72,9 @@ env: # and the companion needs.select-targets.outputs.merge-channel-files property (output values always have string # type). mergeable-channel-file: 'false' + # as this runs on a self hosted runner, we need to override the default working directory, + # otherwise paths in the build job will be too long for `light.exe` + working-directory: 'C:\a' artifacts: - path: '*Windows_64bit.exe' name: Windows_X86-64_interactive_installer @@ -296,11 +299,15 @@ jobs: - name: Checkout if: fromJSON(matrix.config.container) == null uses: actions/checkout@v4 - + with: + path: ${{ matrix.config.working-directory }} + - name: Checkout # actions/checkout@v4 has dependency on a higher version of glibc than available in the Linux container. if: fromJSON(matrix.config.container) != null uses: actions/checkout@v3 + with: + path: ${{ matrix.config.working-directory }} - name: Install Node.js if: fromJSON(matrix.config.container) == null && runner.os != 'Windows' @@ -360,6 +367,7 @@ jobs: CREATE_USERNAME: ${{ secrets.CREATE_USERNAME }} CREATE_PASSWORD: ${{ secrets.CREATE_PASSWORD }} CREATE_CLIENT_SECRET: ${{ secrets.CREATE_CLIENT_SECRET }} + working-directory: ${{ matrix.config.working-directory || './' }} run: | # See: https://www.electron.build/code-signing if [ $CAN_SIGN = false ] || [ $IS_WINDOWS_CONFIG = true ]; then @@ -389,6 +397,7 @@ jobs: if: > needs.select-targets.outputs.merge-channel-files == 'true' && matrix.config.mergeable-channel-file == 'true' + working-directory: ${{ matrix.config.working-directory || './' }} run: | staged_channel_files_path="${{ runner.temp }}/staged-channel-files" mkdir "$staged_channel_files_path" @@ -408,13 +417,14 @@ jobs: with: if-no-files-found: error name: ${{ env.STAGED_CHANNEL_FILES_ARTIFACT }} - path: ${{ env.STAGED_CHANNEL_FILES_PATH }} + path: ${{ matrix.config.working-directory && format('{0}/{1}', matrix.config.working-directory, env.STAGED_CHANNEL_FILES_PATH) || env.STAGED_CHANNEL_FILES_PATH }} + - name: Upload [GitHub Actions] uses: actions/upload-artifact@v3 with: name: ${{ env.JOB_TRANSFER_ARTIFACT }} - path: ${{ env.BUILD_ARTIFACTS_PATH }} + path: ${{ matrix.config.working-directory && format('{0}/{1}', matrix.config.working-directory, env.BUILD_ARTIFACTS_PATH) || env.BUILD_ARTIFACTS_PATH }} merge-channel-files: needs: