build #121
This file contains hidden or 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: build | |
| # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions | |
| permissions: | |
| actions: write | |
| checks: read | |
| contents: write | |
| deployments: read | |
| issues: read | |
| packages: read | |
| pull-requests: read | |
| repository-projects: read | |
| security-events: none | |
| statuses: read | |
| # TODO: Add SLTS (and any needed fetch procedure) after 6.1 and 6.6 are no longer supported as LTS (6.1 SLTS expected to remain supported until 2033). | |
| # https://en.wikipedia.org/wiki/Linux_kernel_version_history | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| runnerName: | |
| required: false | |
| default: ubuntu-latest | |
| type: choice | |
| options: | |
| - ubuntu-latest | |
| - ubuntu-latest-m | |
| - ubuntu-latest-h | |
| forceKernel_mainline: | |
| required: false | |
| default: 6.12. | |
| type: choice | |
| options: | |
| - latest | |
| - 6.12. | |
| - none | |
| forceKernel_mainline_server: | |
| required: false | |
| default: 6.12. | |
| type: choice | |
| options: | |
| - latest | |
| - 6.12. | |
| - none | |
| forceKernel_lts: | |
| required: false | |
| default: 6.12. | |
| type: choice | |
| options: | |
| - latest | |
| - 6.12. | |
| - none | |
| forceKernel_lts_server: | |
| required: false | |
| default: none | |
| type: choice | |
| options: | |
| - latest | |
| - 6.12. | |
| - none | |
| skimfast: | |
| type: boolean | |
| default: false | |
| # https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule | |
| schedule: | |
| #- cron: '5 1 * * 6' | |
| #- cron: '5 1 * * 2,4' | |
| #- cron: '5 1 * * 2' | |
| #- cron: '5 1 * * 4' | |
| #- cron: '25 6 1 * *' | |
| - cron: '25 2 25 * *' | |
| # https://docs.github.com/en/actions/using-jobs/using-concurrency | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build_lts: | |
| if: ${{ github.event.inputs.forceKernel_lts != 'none' }} | |
| runs-on: ${{ github.event.inputs.runnerName == '' && 'ubuntu-latest' || github.event.inputs.runnerName }} | |
| #runs-on: ubuntu-latest | |
| #runs-on: ubuntu-20.04 | |
| #runs-on: buildjet-2vcpu-ubuntu-2004 | |
| #runs-on: buildjet-64vcpu-ubuntu-2004 | |
| steps: | |
| - name: forceKernel_lts-${{ github.event.inputs.forceKernel_lts }} ______________________________ | |
| shell: bash | |
| run: | | |
| true | |
| - name: users | |
| shell: bash | |
| run: | | |
| sudo -u ubuntu -n bash -c 'sudo -n useradd runner --non-unique -u $UID -g $UID' || true | |
| sudo -u ubuntu -n bash -c 'sudo -n groupadd runner --non-unique -g $UID' || true | |
| sudo -u runner -n bash -c 'sudo -n echo $USER $UID' || true | |
| true | |
| # Apparently may increase buildJet 'runner' to 77GB (instead of 61GB). | |
| # Apparently may increase Github Actions 'runner' to 59GB (instead of 31GB) . | |
| - name: Maximize build space | |
| if: ${{ github.event.inputs.runnerName == 'ubuntu-latest' }} | |
| uses: easimon/maximize-build-space@master | |
| with: | |
| #root-reserve-mb: 1625 | |
| root-reserve-mb: 6000 | |
| #temp-reserve-mb: 50 | |
| temp-reserve-mb: 6000 | |
| swap-size-mb: 2 | |
| #remove-dotnet: ${{ github.event.inputs.runnerName != 'ubuntu-latest-h' }} | |
| remove-dotnet: 'true' | |
| #remove-android: ${{ github.event.inputs.runnerName != 'ubuntu-latest-h' }} | |
| remove-android: 'true' | |
| #remove-haskell: ${{ github.event.inputs.runnerName != 'ubuntu-latest-h' }} | |
| remove-haskell: 'true' | |
| #remove-codeql: ${{ github.event.inputs.runnerName != 'ubuntu-latest-h' }} | |
| remove-codeql: 'true' | |
| #remove-docker-images: ${{ github.event.inputs.runnerName != 'ubuntu-latest-h' }} | |
| remove-docker-images: 'true' | |
| - uses: actions/checkout@v2 | |
| - name: _getMinimal_cloud | |
| shell: bash | |
| run: | | |
| ./ubiquitous_bash.sh _getMinimal_cloud | |
| timeout-minutes: 90 | |
| - name: _build_cloud_lts | |
| shell: bash | |
| run: | | |
| #export skimfast=${{ inputs.skimfast }} | |
| #echo skimfast $skimfast | |
| [[ "${{ github.event.inputs.forceKernel_lts }}" != "" ]] && [[ "${{ github.event.inputs.forceKernel_lts }}" != "latest" ]] && export forceKernel_lts="${{ github.event.inputs.forceKernel_lts }}" | |
| ./ubiquitous_bash.sh _build_cloud_prepare | |
| ./ubiquitous_bash.sh _build_cloud_lts | |
| timeout-minutes: 300 | |
| - name: _export_cloud_lts | |
| shell: bash | |
| run: | | |
| ./ubiquitous_bash.sh _export_cloud_lts | |
| timeout-minutes: 90 | |
| #- name: artifacts | |
| #uses: actions/upload-artifact@v3 | |
| #with: | |
| #name: build-lts | |
| #path: | | |
| #./_local/_export/linux-lts-amd64-debian.tar.gz | |
| - name: release! linux-lts-amd64-debian | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| tag_name: build-${{ github.run_id }}-${{ github.run_attempt }} | |
| name: build | |
| files: | | |
| ./_local/_export/linux-lts-amd64-debian.tar.gz | |
| timeout-minutes: 45 | |
| build_mainline: | |
| runs-on: ${{ github.event.inputs.runnerName == '' && 'ubuntu-latest' || github.event.inputs.runnerName }} | |
| #runs-on: ubuntu-latest | |
| #runs-on: ubuntu-20.04 | |
| #runs-on: buildjet-2vcpu-ubuntu-2004 | |
| #runs-on: buildjet-64vcpu-ubuntu-2004 | |
| steps: | |
| - name: forceKernel_mainline-${{ github.event.inputs.forceKernel_mainline }} ______________________________ | |
| shell: bash | |
| run: | | |
| true | |
| - name: RAND_SEED | |
| shell: bash | |
| run: | | |
| echo "$RAND_SEED" | tee /dev/urandom > /dev/null | |
| echo "$RAND_SEED" | tee /dev/random > /dev/null | |
| echo "$RAND_SEED" | sudo -n tee /dev/urandom > /dev/null | |
| echo "$RAND_SEED" | sudo -n tee /dev/random > /dev/null | |
| env: | |
| RAND_SEED: ${{ secrets.RAND_SEED }} | |
| - name: users | |
| shell: bash | |
| run: | | |
| sudo -u ubuntu -n bash -c 'sudo -n useradd runner --non-unique -u $UID -g $UID' || true | |
| sudo -u ubuntu -n bash -c 'sudo -n groupadd runner --non-unique -g $UID' || true | |
| sudo -u runner -n bash -c 'sudo -n echo $USER $UID' || true | |
| true | |
| # Apparently may increase buildJet 'runner' to 77GB (instead of 61GB). | |
| # Apparently may increase Github Actions 'runner' to 59GB (instead of 31GB) . | |
| - name: Maximize build space | |
| if: ${{ github.event.inputs.runnerName == 'ubuntu-latest' }} | |
| uses: easimon/maximize-build-space@master | |
| with: | |
| #root-reserve-mb: 1625 | |
| root-reserve-mb: 6000 | |
| #temp-reserve-mb: 50 | |
| temp-reserve-mb: 6000 | |
| swap-size-mb: 2 | |
| #remove-dotnet: ${{ github.event.inputs.runnerName != 'ubuntu-latest-h' }} | |
| remove-dotnet: 'true' | |
| #remove-android: ${{ github.event.inputs.runnerName != 'ubuntu-latest-h' }} | |
| remove-android: 'true' | |
| #remove-haskell: ${{ github.event.inputs.runnerName != 'ubuntu-latest-h' }} | |
| remove-haskell: 'true' | |
| #remove-codeql: ${{ github.event.inputs.runnerName != 'ubuntu-latest-h' }} | |
| remove-codeql: 'true' | |
| #remove-docker-images: ${{ github.event.inputs.runnerName != 'ubuntu-latest-h' }} | |
| remove-docker-images: 'true' | |
| - uses: actions/checkout@v2 | |
| - name: _getMinimal_cloud | |
| shell: bash | |
| run: | | |
| ./ubiquitous_bash.sh _getMinimal_cloud | |
| timeout-minutes: 90 | |
| - name: _build_cloud_mainline | |
| shell: bash | |
| run: | | |
| #export skimfast=${{ inputs.skimfast }} | |
| #echo skimfast $skimfast | |
| [[ "${{ github.event.inputs.forceKernel_mainline }}" != "" ]] && [[ "${{ github.event.inputs.forceKernel_mainline }}" != "latest" ]] && export forceKernel_mainline="${{ github.event.inputs.forceKernel_mainline }}" | |
| ./ubiquitous_bash.sh _build_cloud_prepare | |
| ./ubiquitous_bash.sh _build_cloud_mainline | |
| timeout-minutes: 300 | |
| - name: _export_cloud_mainline | |
| shell: bash | |
| run: | | |
| ./ubiquitous_bash.sh _export_cloud_mainline | |
| timeout-minutes: 90 | |
| # https://github.com/marketplace/actions/debugging-with-tmate | |
| # $RUNNER_WORKSPACE | |
| # rclone config --config="/rclone.conf" | |
| # sudo touch /continue | |
| # bash -i | |
| # source ~/.bashrc | |
| # Type 'q' at the 'Web shell' or use SSH . | |
| #- name: Setup tmate session | |
| #if: ${{ failure() }} | |
| #uses: mxschmitt/action-tmate@v3 | |
| ## ssh -i <path-to-key> <tmate-connection-string> | |
| #with: | |
| #limit-access-to-actor: true | |
| #timeout-minutes: 5 | |
| #- name: artifacts | |
| #uses: actions/upload-artifact@v3 | |
| #with: | |
| #name: build-mainline | |
| #path: | | |
| #./_local/_export/linux-mainline-amd64-debian.tar.gz | |
| - name: release! linux-mainline-amd64-debian | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| tag_name: build-${{ github.run_id }}-${{ github.run_attempt }} | |
| name: build | |
| files: | | |
| ./_local/_export/linux-mainline-amd64-debian.tar.gz | |
| timeout-minutes: 45 | |
| build_mainline-server: | |
| if: ${{ github.event.inputs.forceKernel_mainline_server != 'none' }} | |
| runs-on: ${{ github.event.inputs.runnerName == '' && 'ubuntu-latest' || github.event.inputs.runnerName }} | |
| #runs-on: ubuntu-latest | |
| #runs-on: ubuntu-20.04 | |
| #runs-on: buildjet-2vcpu-ubuntu-2004 | |
| #runs-on: buildjet-64vcpu-ubuntu-2004 | |
| steps: | |
| - name: forceKernel_mainline_server-${{ github.event.inputs.forceKernel_mainline_server }} ______________________________ | |
| shell: bash | |
| run: | | |
| true | |
| - name: RAND_SEED | |
| shell: bash | |
| run: | | |
| echo "$RAND_SEED" | tee /dev/urandom > /dev/null | |
| echo "$RAND_SEED" | tee /dev/random > /dev/null | |
| echo "$RAND_SEED" | sudo -n tee /dev/urandom > /dev/null | |
| echo "$RAND_SEED" | sudo -n tee /dev/random > /dev/null | |
| env: | |
| RAND_SEED: ${{ secrets.RAND_SEED }} | |
| - name: users | |
| shell: bash | |
| run: | | |
| sudo -u ubuntu -n bash -c 'sudo -n useradd runner --non-unique -u $UID -g $UID' || true | |
| sudo -u ubuntu -n bash -c 'sudo -n groupadd runner --non-unique -g $UID' || true | |
| sudo -u runner -n bash -c 'sudo -n echo $USER $UID' || true | |
| true | |
| # Apparently may increase buildJet 'runner' to 77GB (instead of 61GB). | |
| # Apparently may increase Github Actions 'runner' to 59GB (instead of 31GB) . | |
| - name: Maximize build space | |
| if: ${{ github.event.inputs.runnerName == 'ubuntu-latest' }} | |
| uses: easimon/maximize-build-space@master | |
| with: | |
| #root-reserve-mb: 1625 | |
| root-reserve-mb: 6000 | |
| #temp-reserve-mb: 50 | |
| temp-reserve-mb: 6000 | |
| swap-size-mb: 2 | |
| #remove-dotnet: ${{ github.event.inputs.runnerName != 'ubuntu-latest-h' }} | |
| remove-dotnet: 'true' | |
| #remove-android: ${{ github.event.inputs.runnerName != 'ubuntu-latest-h' }} | |
| remove-android: 'true' | |
| #remove-haskell: ${{ github.event.inputs.runnerName != 'ubuntu-latest-h' }} | |
| remove-haskell: 'true' | |
| #remove-codeql: ${{ github.event.inputs.runnerName != 'ubuntu-latest-h' }} | |
| remove-codeql: 'true' | |
| #remove-docker-images: ${{ github.event.inputs.runnerName != 'ubuntu-latest-h' }} | |
| remove-docker-images: 'true' | |
| - uses: actions/checkout@v2 | |
| - name: _getMinimal_cloud | |
| shell: bash | |
| run: | | |
| ./ubiquitous_bash.sh _getMinimal_cloud | |
| timeout-minutes: 90 | |
| - name: _build_cloud_mainline | |
| shell: bash | |
| run: | | |
| #export skimfast=${{ inputs.skimfast }} | |
| #echo skimfast $skimfast | |
| [[ "${{ github.event.inputs.forceKernel_mainline_server }}" != "" ]] && [[ "${{ github.event.inputs.forceKernel_mainline_server }}" != "latest" ]] && export forceKernel_mainline="${{ github.event.inputs.forceKernel_mainline_server }}" | |
| ./ubiquitous_bash.sh _build_cloud_prepare | |
| ./ubiquitous_bash.sh _build_cloud_mainline-server | |
| timeout-minutes: 300 | |
| - name: _export_cloud_mainline | |
| shell: bash | |
| run: | | |
| ./ubiquitous_bash.sh _export_cloud_mainline-server | |
| timeout-minutes: 90 | |
| # https://github.com/marketplace/actions/debugging-with-tmate | |
| # $RUNNER_WORKSPACE | |
| # rclone config --config="/rclone.conf" | |
| # sudo touch /continue | |
| # bash -i | |
| # source ~/.bashrc | |
| # Type 'q' at the 'Web shell' or use SSH . | |
| #- name: Setup tmate session | |
| #if: ${{ failure() }} | |
| #uses: mxschmitt/action-tmate@v3 | |
| ## ssh -i <path-to-key> <tmate-connection-string> | |
| #with: | |
| #limit-access-to-actor: true | |
| #timeout-minutes: 5 | |
| #- name: artifacts | |
| #uses: actions/upload-artifact@v3 | |
| #with: | |
| #name: build-mainline | |
| #path: | | |
| #./_local/_export/linux-mainline-amd64-debian.tar.gz | |
| - name: release! linux-mainline-server-amd64-debian | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| tag_name: build-${{ github.run_id }}-${{ github.run_attempt }} | |
| name: build | |
| files: | | |
| ./_local/_export/linux-mainline-server-amd64-debian.tar.gz | |
| timeout-minutes: 45 | |
| build_lts-server: | |
| if: ${{ github.event.inputs.forceKernel_lts_server != 'none' }} | |
| runs-on: ${{ github.event.inputs.runnerName == '' && 'ubuntu-latest' || github.event.inputs.runnerName }} | |
| #runs-on: ubuntu-latest | |
| #runs-on: ubuntu-20.04 | |
| #runs-on: buildjet-2vcpu-ubuntu-2004 | |
| #runs-on: buildjet-64vcpu-ubuntu-2004 | |
| steps: | |
| - name: forceKernel_lts_server-${{ github.event.inputs.forceKernel_lts_server }} ______________________________ | |
| shell: bash | |
| run: | | |
| true | |
| - name: RAND_SEED | |
| shell: bash | |
| run: | | |
| echo "$RAND_SEED" | tee /dev/urandom > /dev/null | |
| echo "$RAND_SEED" | tee /dev/random > /dev/null | |
| echo "$RAND_SEED" | sudo -n tee /dev/urandom > /dev/null | |
| echo "$RAND_SEED" | sudo -n tee /dev/random > /dev/null | |
| env: | |
| RAND_SEED: ${{ secrets.RAND_SEED }} | |
| - name: users | |
| shell: bash | |
| run: | | |
| sudo -u ubuntu -n bash -c 'sudo -n useradd runner --non-unique -u $UID -g $UID' || true | |
| sudo -u ubuntu -n bash -c 'sudo -n groupadd runner --non-unique -g $UID' || true | |
| sudo -u runner -n bash -c 'sudo -n echo $USER $UID' || true | |
| true | |
| # Apparently may increase buildJet 'runner' to 77GB (instead of 61GB). | |
| # Apparently may increase Github Actions 'runner' to 59GB (instead of 31GB) . | |
| - name: Maximize build space | |
| if: ${{ github.event.inputs.runnerName == 'ubuntu-latest' }} | |
| uses: easimon/maximize-build-space@master | |
| with: | |
| #root-reserve-mb: 1625 | |
| root-reserve-mb: 6000 | |
| #temp-reserve-mb: 50 | |
| temp-reserve-mb: 6000 | |
| swap-size-mb: 2 | |
| #remove-dotnet: ${{ github.event.inputs.runnerName != 'ubuntu-latest-h' }} | |
| remove-dotnet: 'true' | |
| #remove-android: ${{ github.event.inputs.runnerName != 'ubuntu-latest-h' }} | |
| remove-android: 'true' | |
| #remove-haskell: ${{ github.event.inputs.runnerName != 'ubuntu-latest-h' }} | |
| remove-haskell: 'true' | |
| #remove-codeql: ${{ github.event.inputs.runnerName != 'ubuntu-latest-h' }} | |
| remove-codeql: 'true' | |
| #remove-docker-images: ${{ github.event.inputs.runnerName != 'ubuntu-latest-h' }} | |
| remove-docker-images: 'true' | |
| - uses: actions/checkout@v2 | |
| - name: _getMinimal_cloud | |
| shell: bash | |
| run: | | |
| ./ubiquitous_bash.sh _getMinimal_cloud | |
| timeout-minutes: 90 | |
| - name: _build_cloud_lts | |
| shell: bash | |
| run: | | |
| #export skimfast=${{ inputs.skimfast }} | |
| #echo skimfast $skimfast | |
| [[ "${{ github.event.inputs.forceKernel_lts_server }}" != "" ]] && [[ "${{ github.event.inputs.forceKernel_lts_server }}" != "latest" ]] && export forceKernel_lts="${{ github.event.inputs.forceKernel_lts_server }}" | |
| ./ubiquitous_bash.sh _build_cloud_prepare | |
| ./ubiquitous_bash.sh _build_cloud_lts-server | |
| timeout-minutes: 300 | |
| - name: _export_cloud_lts | |
| shell: bash | |
| run: | | |
| ./ubiquitous_bash.sh _export_cloud_lts-server | |
| timeout-minutes: 90 | |
| # https://github.com/marketplace/actions/debugging-with-tmate | |
| # $RUNNER_WORKSPACE | |
| # rclone config --config="/rclone.conf" | |
| # sudo touch /continue | |
| # bash -i | |
| # source ~/.bashrc | |
| # Type 'q' at the 'Web shell' or use SSH . | |
| #- name: Setup tmate session | |
| #if: ${{ failure() }} | |
| #uses: mxschmitt/action-tmate@v3 | |
| ## ssh -i <path-to-key> <tmate-connection-string> | |
| #with: | |
| #limit-access-to-actor: true | |
| #timeout-minutes: 5 | |
| #- name: artifacts | |
| #uses: actions/upload-artifact@v3 | |
| #with: | |
| #name: build-lts | |
| #path: | | |
| #./_local/_export/linux-lts-amd64-debian.tar.gz | |
| - name: release! linux-lts-server-amd64-debian | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| tag_name: build-${{ github.run_id }}-${{ github.run_attempt }} | |
| name: build | |
| files: | | |
| ./_local/_export/linux-lts-server-amd64-debian.tar.gz | |
| timeout-minutes: 45 | |