build #163
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 | |
| # ATTENTION: NOTICE: FURTHER: Development roadmap for better ensuring a consistent kernel build compiler toolchain would be to add '_chroot lite' functions or exported environment variable to chroot without using a separate filesystem/loopback, etc. Either 'debootstrap', or 'Live ISO' (similar to AppImage build process) would be used to create a very minimal chroot environment sufficient for kernel compiling, at minimal disk space consumption, etc. | |
| # For the shorter term, docker container experiments are used for the same purpose. | |
| # 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-22.04 | |
| type: choice | |
| options: | |
| - ubuntu-22.04 | |
| - ubuntu-22.04-m | |
| - ubuntu-22.04-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 | |
| getfast: | |
| type: boolean | |
| default: true | |
| container: | |
| required: false | |
| default: docker | |
| type: choice | |
| options: | |
| - docker | |
| - none | |
| # 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-22.04' || github.event.inputs.runnerName }} | |
| 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 | |
| # https://github.com/easimon/maximize-build-space | |
| - name: Maximize build space | |
| if: ${{ github.event.inputs.runnerName != 'ubuntu-latest-m' && github.event.inputs.runnerName != 'ubuntu-latest-l' && github.event.inputs.runnerName != 'ubuntu-latest-h' && github.event.inputs.runnerName != 'ubuntu-22.04-m' && github.event.inputs.runnerName != 'ubuntu-22.04-l' && github.event.inputs.runnerName != 'ubuntu-22.04-h' }} | |
| 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: 'true' | |
| remove-android: 'true' | |
| remove-haskell: 'true' | |
| remove-codeql: 'true' | |
| remove-docker-images: 'true' | |
| - name: Maximize build space ! remove ONLY | |
| if: ${{ github.event.inputs.runnerName == 'ubuntu-latest-m' || github.event.inputs.runnerName == 'ubuntu-latest-l' || github.event.inputs.runnerName == 'ubuntu-latest-h' || github.event.inputs.runnerName == 'ubuntu-22.04-m' || github.event.inputs.runnerName == 'ubuntu-22.04-l' || github.event.inputs.runnerName == 'ubuntu-22.04-h' }} | |
| uses: AdityaGarg8/[email protected] | |
| with: | |
| remove-dotnet: 'true' | |
| remove-android: 'true' | |
| remove-haskell: 'true' | |
| remove-codeql: 'true' | |
| remove-docker-images: 'true' | |
| remove-large-packages: 'true' | |
| remove-cached-tools: 'true' | |
| remove-swapfile: 'true' | |
| verbose: 'false' | |
| - uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 1 | |
| submodules: 'recursive' | |
| # https://moebuta.org/posts/using-github-actions-to-build-linux-kernels/?utm_source=chatgpt.com | |
| # https://dev.to/emmanuelnk/using-sudo-without-password-prompt-as-non-root-docker-user-52bg | |
| # https://stackoverflow.com/questions/35594987/how-to-force-docker-for-a-clean-build-of-an-image | |
| # https://www.howtogeek.com/devops/how-to-make-docker-rebuild-an-image-without-its-cache/ | |
| # ATTRIBUTION-AI: ChatGPT 4o , o1 2025-01-18 . | |
| # ATTENTION: See Dockerfile for additional very relevant example commands, documentation, CAUTIONs, DANGERs, WARNINGs, etc ! | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Log in to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: build docker image | |
| #if: ${{ github.event.inputs.container == 'docker' || github.event.inputs.container == '' }} | |
| run: | | |
| docker build --pull --no-cache --build-arg HOST_UID=$(id -u) --build-arg HOST_GID=$(id -g) -t debian_bookworm-docker-image:latest . | |
| - name: _build_cloud_lts! docker | |
| if: ${{ github.event.inputs.container == 'docker' || github.event.inputs.container == '' }} | |
| 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 }}" | |
| #'export skimfast='"$skimfast"' ; ' | |
| docker run --name debian_bookworm-docker-container --rm -v "$PWD":/currentPWD:rw debian_bookworm-docker-image:latest bash -c 'export forceKernel_lts='"$forceKernel_lts"' ; ''./ubiquitous_bash.sh _build_cloud_prepare' | |
| docker run --name debian_bookworm-docker-container --rm -v "$PWD":/currentPWD:rw debian_bookworm-docker-image:latest bash -c 'export forceKernel_lts='"$forceKernel_lts"' ; ''./ubiquitous_bash.sh _build_cloud_lts' | |
| true | |
| - name: _getMinimal_cloud | |
| #if: ${{ github.event.inputs.container == 'none' }} | |
| shell: bash | |
| run: | | |
| export getfast=${{ inputs.getfast }} | |
| ./ubiquitous_bash.sh _getMinimal_cloud | |
| timeout-minutes: 90 | |
| - name: _build_cloud_lts | |
| if: ${{ github.event.inputs.container == 'none' }} | |
| 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: | |
| if: ${{ github.event.inputs.forceKernel_mainline != 'none' }} | |
| runs-on: ${{ github.event.inputs.runnerName == '' && 'ubuntu-22.04' || github.event.inputs.runnerName }} | |
| 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 | |
| # https://github.com/easimon/maximize-build-space | |
| - name: Maximize build space | |
| if: ${{ github.event.inputs.runnerName != 'ubuntu-latest-m' && github.event.inputs.runnerName != 'ubuntu-latest-l' && github.event.inputs.runnerName != 'ubuntu-latest-h' && github.event.inputs.runnerName != 'ubuntu-22.04-m' && github.event.inputs.runnerName != 'ubuntu-22.04-l' && github.event.inputs.runnerName != 'ubuntu-22.04-h' }} | |
| 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: 'true' | |
| remove-android: 'true' | |
| remove-haskell: 'true' | |
| remove-codeql: 'true' | |
| remove-docker-images: 'true' | |
| - name: Maximize build space ! remove ONLY | |
| if: ${{ github.event.inputs.runnerName == 'ubuntu-latest-m' || github.event.inputs.runnerName == 'ubuntu-latest-l' || github.event.inputs.runnerName == 'ubuntu-latest-h' || github.event.inputs.runnerName == 'ubuntu-22.04-m' || github.event.inputs.runnerName == 'ubuntu-22.04-l' || github.event.inputs.runnerName == 'ubuntu-22.04-h' }} | |
| uses: AdityaGarg8/[email protected] | |
| with: | |
| remove-dotnet: 'true' | |
| remove-android: 'true' | |
| remove-haskell: 'true' | |
| remove-codeql: 'true' | |
| remove-docker-images: 'true' | |
| remove-large-packages: 'true' | |
| remove-cached-tools: 'true' | |
| remove-swapfile: 'true' | |
| verbose: 'false' | |
| - uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 1 | |
| submodules: 'recursive' | |
| # https://moebuta.org/posts/using-github-actions-to-build-linux-kernels/?utm_source=chatgpt.com | |
| # https://dev.to/emmanuelnk/using-sudo-without-password-prompt-as-non-root-docker-user-52bg | |
| # https://stackoverflow.com/questions/35594987/how-to-force-docker-for-a-clean-build-of-an-image | |
| # https://www.howtogeek.com/devops/how-to-make-docker-rebuild-an-image-without-its-cache/ | |
| # ATTRIBUTION-AI: ChatGPT 4o , o1 2025-01-18 . | |
| # ATTENTION: See Dockerfile for additional very relevant example commands, documentation, CAUTIONs, DANGERs, WARNINGs, etc ! | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Log in to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: build docker image | |
| #if: ${{ github.event.inputs.container == 'docker' || github.event.inputs.container == '' }} | |
| run: | | |
| docker build --pull --no-cache --build-arg HOST_UID=$(id -u) --build-arg HOST_GID=$(id -g) -t debian_bookworm-docker-image:latest . | |
| - name: _build_cloud_mainline! docker | |
| if: ${{ github.event.inputs.container == 'docker' || github.event.inputs.container == '' }} | |
| 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 }}" | |
| #'export skimfast='"$skimfast"' ; ' | |
| docker run --name debian_bookworm-docker-container --rm -v "$PWD":/currentPWD:rw debian_bookworm-docker-image:latest bash -c 'export forceKernel_mainline='"$forceKernel_mainline"' ; ''./ubiquitous_bash.sh _build_cloud_prepare' | |
| docker run --name debian_bookworm-docker-container --rm -v "$PWD":/currentPWD:rw debian_bookworm-docker-image:latest bash -c 'export forceKernel_mainline='"$forceKernel_mainline"' ; ''./ubiquitous_bash.sh _build_cloud_mainline' | |
| true | |
| - name: _getMinimal_cloud | |
| #if: ${{ github.event.inputs.container == 'none' }} | |
| shell: bash | |
| run: | | |
| export getfast=${{ inputs.getfast }} | |
| ./ubiquitous_bash.sh _getMinimal_cloud | |
| timeout-minutes: 90 | |
| - name: _build_cloud_mainline | |
| if: ${{ github.event.inputs.container == 'none' }} | |
| 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-22.04' || github.event.inputs.runnerName }} | |
| 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 | |
| # https://github.com/easimon/maximize-build-space | |
| - name: Maximize build space | |
| if: ${{ github.event.inputs.runnerName != 'ubuntu-latest-m' && github.event.inputs.runnerName != 'ubuntu-latest-l' && github.event.inputs.runnerName != 'ubuntu-latest-h' && github.event.inputs.runnerName != 'ubuntu-22.04-m' && github.event.inputs.runnerName != 'ubuntu-22.04-l' && github.event.inputs.runnerName != 'ubuntu-22.04-h' }} | |
| 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: 'true' | |
| remove-android: 'true' | |
| remove-haskell: 'true' | |
| remove-codeql: 'true' | |
| remove-docker-images: 'true' | |
| - name: Maximize build space ! remove ONLY | |
| if: ${{ github.event.inputs.runnerName == 'ubuntu-latest-m' || github.event.inputs.runnerName == 'ubuntu-latest-l' || github.event.inputs.runnerName == 'ubuntu-latest-h' || github.event.inputs.runnerName == 'ubuntu-22.04-m' || github.event.inputs.runnerName == 'ubuntu-22.04-l' || github.event.inputs.runnerName == 'ubuntu-22.04-h' }} | |
| uses: AdityaGarg8/[email protected] | |
| with: | |
| remove-dotnet: 'true' | |
| remove-android: 'true' | |
| remove-haskell: 'true' | |
| remove-codeql: 'true' | |
| remove-docker-images: 'true' | |
| remove-large-packages: 'true' | |
| remove-cached-tools: 'true' | |
| remove-swapfile: 'true' | |
| verbose: 'false' | |
| - uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 1 | |
| submodules: 'recursive' | |
| # https://moebuta.org/posts/using-github-actions-to-build-linux-kernels/?utm_source=chatgpt.com | |
| # https://dev.to/emmanuelnk/using-sudo-without-password-prompt-as-non-root-docker-user-52bg | |
| # https://stackoverflow.com/questions/35594987/how-to-force-docker-for-a-clean-build-of-an-image | |
| # https://www.howtogeek.com/devops/how-to-make-docker-rebuild-an-image-without-its-cache/ | |
| # ATTRIBUTION-AI: ChatGPT 4o , o1 2025-01-18 . | |
| # ATTENTION: See Dockerfile for additional very relevant example commands, documentation, CAUTIONs, DANGERs, WARNINGs, etc ! | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Log in to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: build docker image | |
| #if: ${{ github.event.inputs.container == 'docker' || github.event.inputs.container == '' }} | |
| run: | | |
| docker build --pull --no-cache --build-arg HOST_UID=$(id -u) --build-arg HOST_GID=$(id -g) -t debian_bookworm-docker-image:latest . | |
| - name: _build_cloud_mainline-server! docker | |
| if: ${{ github.event.inputs.container == 'docker' || github.event.inputs.container == '' }} | |
| 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 }}" | |
| #'export skimfast='"$skimfast"' ; ' | |
| docker run --name debian_bookworm-docker-container --rm -v "$PWD":/currentPWD:rw debian_bookworm-docker-image:latest bash -c 'export forceKernel_mainline='"$forceKernel_mainline"' ; ''./ubiquitous_bash.sh _build_cloud_prepare' | |
| docker run --name debian_bookworm-docker-container --rm -v "$PWD":/currentPWD:rw debian_bookworm-docker-image:latest bash -c 'export forceKernel_mainline='"$forceKernel_mainline"' ; ''./ubiquitous_bash.sh _build_cloud_mainline-server' | |
| true | |
| - name: _getMinimal_cloud | |
| #if: ${{ github.event.inputs.container == 'none' }} | |
| shell: bash | |
| run: | | |
| export getfast=${{ inputs.getfast }} | |
| ./ubiquitous_bash.sh _getMinimal_cloud | |
| timeout-minutes: 90 | |
| - name: _build_cloud_mainline-server | |
| if: ${{ github.event.inputs.container == 'none' }} | |
| 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-22.04' || github.event.inputs.runnerName }} | |
| 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 | |
| # https://github.com/easimon/maximize-build-space | |
| - name: Maximize build space | |
| if: ${{ github.event.inputs.runnerName != 'ubuntu-latest-m' && github.event.inputs.runnerName != 'ubuntu-latest-l' && github.event.inputs.runnerName != 'ubuntu-latest-h' && github.event.inputs.runnerName != 'ubuntu-22.04-m' && github.event.inputs.runnerName != 'ubuntu-22.04-l' && github.event.inputs.runnerName != 'ubuntu-22.04-h' }} | |
| 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: 'true' | |
| remove-android: 'true' | |
| remove-haskell: 'true' | |
| remove-codeql: 'true' | |
| remove-docker-images: 'true' | |
| - name: Maximize build space ! remove ONLY | |
| if: ${{ github.event.inputs.runnerName == 'ubuntu-latest-m' || github.event.inputs.runnerName == 'ubuntu-latest-l' || github.event.inputs.runnerName == 'ubuntu-latest-h' || github.event.inputs.runnerName == 'ubuntu-22.04-m' || github.event.inputs.runnerName == 'ubuntu-22.04-l' || github.event.inputs.runnerName == 'ubuntu-22.04-h' }} | |
| uses: AdityaGarg8/[email protected] | |
| with: | |
| remove-dotnet: 'true' | |
| remove-android: 'true' | |
| remove-haskell: 'true' | |
| remove-codeql: 'true' | |
| remove-docker-images: 'true' | |
| remove-large-packages: 'true' | |
| remove-cached-tools: 'true' | |
| remove-swapfile: 'true' | |
| verbose: 'false' | |
| - uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 1 | |
| submodules: 'recursive' | |
| # https://moebuta.org/posts/using-github-actions-to-build-linux-kernels/?utm_source=chatgpt.com | |
| # https://dev.to/emmanuelnk/using-sudo-without-password-prompt-as-non-root-docker-user-52bg | |
| # https://stackoverflow.com/questions/35594987/how-to-force-docker-for-a-clean-build-of-an-image | |
| # https://www.howtogeek.com/devops/how-to-make-docker-rebuild-an-image-without-its-cache/ | |
| # ATTRIBUTION-AI: ChatGPT 4o , o1 2025-01-18 . | |
| # ATTENTION: See Dockerfile for additional very relevant example commands, documentation, CAUTIONs, DANGERs, WARNINGs, etc ! | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Log in to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: build docker image | |
| #if: ${{ github.event.inputs.container == 'docker' || github.event.inputs.container == '' }} | |
| run: | | |
| docker build --pull --no-cache --build-arg HOST_UID=$(id -u) --build-arg HOST_GID=$(id -g) -t debian_bookworm-docker-image:latest . | |
| - name: _build_cloud_lts-server! docker | |
| if: ${{ github.event.inputs.container == 'docker' || github.event.inputs.container == '' }} | |
| 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 }}" | |
| #'export skimfast='"$skimfast"' ; ' | |
| docker run --name debian_bookworm-docker-container --rm -v "$PWD":/currentPWD:rw debian_bookworm-docker-image:latest bash -c 'export forceKernel_lts='"$forceKernel_lts"' ; ''./ubiquitous_bash.sh _build_cloud_prepare' | |
| docker run --name debian_bookworm-docker-container --rm -v "$PWD":/currentPWD:rw debian_bookworm-docker-image:latest bash -c 'export forceKernel_lts='"$forceKernel_lts"' ; ''./ubiquitous_bash.sh _build_cloud_lts-server' | |
| true | |
| - name: _getMinimal_cloud | |
| #if: ${{ github.event.inputs.container == 'none' }} | |
| shell: bash | |
| run: | | |
| export getfast=${{ inputs.getfast }} | |
| ./ubiquitous_bash.sh _getMinimal_cloud | |
| timeout-minutes: 90 | |
| - name: _build_cloud_lts-server | |
| if: ${{ github.event.inputs.container == 'none' }} | |
| 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 | |