diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/benchmarks.yml deleted file mode 100644 index d4a7402b3916..000000000000 --- a/.github/workflows/benchmarks.yml +++ /dev/null @@ -1,116 +0,0 @@ -name: âšĄī¸ Benchmarks - -on: - workflow_dispatch: - inputs: - repeats: - description: "The number of times to execute each benchmark" - type: number - default: 1 - push: - paths-ignore: - - "**.md" - branches: - - "long_lived/**" - - main - - "release/**" - release: - types: [published] - pull_request: - paths-ignore: - - "**.md" - branches: - - "**" - -concurrency: - group: ${{ github.event_name == 'pull_request' && format('{0}-{1}', github.workflow_ref, github.event.pull_request.number) || github.run_id }} - cancel-in-progress: true - -jobs: - setup: - name: Setup - runs-on: ubuntu-latest - timeout-minutes: 5 - outputs: - repeats: ${{ steps.repeats.outputs.repeats }} - timeout: ${{ steps.timeout.outputs.timeout }} - - steps: - - name: Calculate repeats - id: repeats - run: | - echo "repeats=${{ inputs.repeats != '' && inputs.repeats || 1 }}" >> "$GITHUB_OUTPUT" - - name: Calculate timeout - id: timeout - run: | - echo "timeout=$(( ${{ steps.repeats.outputs.repeats }} * 20 ))" >> "$GITHUB_OUTPUT" - - build: - name: Benchmarks - runs-on: ${{ github.repository_owner == 'Chia-Network' && 'benchmark' || 'ubuntu-latest' }} - needs: - - setup - container: - image: chianetwork/ubuntu-22.04-builder:latest - timeout-minutes: ${{ fromJSON(needs.setup.outputs.timeout) }} - strategy: - fail-fast: false - matrix: - python-version: ["3.10"] - env: - CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet - BLOCKS_AND_PLOTS_VERSION: 0.44.0 - - steps: - - name: Clean workspace - uses: Chia-Network/actions/clean-workspace@main - - - name: Add safe git directory - uses: Chia-Network/actions/git-mark-workspace-safe@main - - - name: Checkout Code - uses: actions/checkout@v5 - with: - fetch-depth: 0 - - - uses: chia-network/actions/cache-pip@main - with: - mode: poetry - - - name: Checkout test blocks and plots - uses: actions/checkout@v5 - with: - repository: "Chia-Network/test-cache" - path: ".chia" - ref: ${{ env.BLOCKS_AND_PLOTS_VERSION }} - fetch-depth: 1 - - - uses: ./.github/actions/install - with: - python-version: ${{ matrix.python-version }} - development: true - legacy_keyring: true - - - uses: chia-network/actions/activate-venv@main - - - name: pytest - run: | - pytest -n 0 --capture no -m benchmark -o 'junit_suite_name=benchmarks' --junitxml=junit-data/benchmarks.raw.xml --benchmark-repeats ${{ needs.setup.outputs.repeats }} chia/_tests/ - - - name: Format JUnit data and prepare results - if: always() - run: | - yq junit-data/benchmarks.raw.xml > junit-data/benchmarks.xml - - - name: Publish JUnit results - if: always() - uses: actions/upload-artifact@v4 - with: - name: junit-data - path: junit-data/* - if-no-files-found: error - - - name: Add benchmark results to workflow summary - if: always() - run: | - python -m chia._tests.process_junit --type benchmark --xml junit-data/benchmarks.xml --markdown --link-prefix ${{ github.event.repository.html_url }}/blob/${{ github.sha }}/ --link-line-separator \#L >> "$GITHUB_STEP_SUMMARY" diff --git a/.github/workflows/build-linux-installer-deb.yml b/.github/workflows/build-linux-installer-deb.yml deleted file mode 100644 index d6df3e8fe6bd..000000000000 --- a/.github/workflows/build-linux-installer-deb.yml +++ /dev/null @@ -1,341 +0,0 @@ -name: đŸ“Ļ🚀 Build Installer - Linux DEB - -on: - workflow_dispatch: - inputs: - release_type: - description: "Tagged release testing scenario" - required: false - type: choice - default: "" - options: - - "" - - 9.9.9-b1 - - 9.9.9-rc1 - - 9.9.9 - push: - paths-ignore: - - "**.md" - branches: - - "long_lived/**" - - main - - "release/**" - release: - types: [published] - pull_request: - paths-ignore: - - "**.md" - branches: - - "**" - -concurrency: - group: ${{ github.event_name == 'pull_request' && format('{0}-{1}', github.workflow_ref, github.event.pull_request.number) || github.run_id }} - cancel-in-progress: true - -permissions: - id-token: write - contents: write - -jobs: - version: - uses: ./.github/workflows/reflow-version.yml - with: - release_type: ${{ inputs.release_type }} - - build: - name: Build ${{ matrix.os.arch }} - runs-on: ${{ matrix.os.runs-on }} - needs: - - version - container: chianetwork/ubuntu-22.04-builder:latest - timeout-minutes: 120 - strategy: - fail-fast: false - matrix: - python-version: ["3.10"] - os: - - runs-on: ubuntu-latest - arch: amd64 - madmax-suffix: "x86-64" - bladebit-suffix: "ubuntu-x86-64.tar.gz" - arch-artifact-name: intel - - runs-on: ubuntu-24.04-arm - arch: arm64 - madmax-suffix: "arm64" - bladebit-suffix: "ubuntu-arm64.tar.gz" - arch-artifact-name: arm - - env: - CHIA_INSTALLER_VERSION: ${{ needs.version.outputs.chia-installer-version }} - POETRY_DYNAMIC_VERSIONING_OVERRIDE: "chia-blockchain=${{ needs.version.outputs.chia-installer-version }}" - TAG_TYPE: ${{ needs.version.outputs.tag-type }} - - steps: - - uses: Chia-Network/actions/clean-workspace@main - - - name: Add safe git directory - uses: Chia-Network/actions/git-mark-workspace-safe@main - - - name: Checkout Code - uses: actions/checkout@v5 - with: - fetch-depth: 0 - submodules: recursive - - - uses: Chia-Network/actions/git-ssh-to-https@main - - - name: Cleanup any leftovers that exist from previous runs - run: bash build_scripts/clean-runner.sh || true - - - name: Set Env - uses: Chia-Network/actions/setjobenv@main - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Get latest madmax plotter - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - LATEST_MADMAX=$(gh api repos/Chia-Network/chia-plotter-madmax/releases/latest --jq 'select(.prerelease == false) | .tag_name') - mkdir "$GITHUB_WORKSPACE"/madmax - gh release download -R Chia-Network/chia-plotter-madmax "$LATEST_MADMAX" -p 'chia_plot-*-${{ matrix.os.madmax-suffix }}' -O "$GITHUB_WORKSPACE"/madmax/chia_plot - gh release download -R Chia-Network/chia-plotter-madmax "$LATEST_MADMAX" -p 'chia_plot_k34-*-${{ matrix.os.madmax-suffix }}' -O "$GITHUB_WORKSPACE"/madmax/chia_plot_k34 - chmod +x "$GITHUB_WORKSPACE"/madmax/chia_plot - chmod +x "$GITHUB_WORKSPACE"/madmax/chia_plot_k34 - - - name: Fetch bladebit versions - shell: bash - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - # Fetch the latest version of each type - LATEST_RELEASE=$(gh api repos/Chia-Network/bladebit/releases/latest --jq 'select(.prerelease == false) | .tag_name') - LATEST_BETA=$(gh api repos/Chia-Network/bladebit/releases --jq 'map(select(.prerelease) | select(.tag_name | test("^v[0-9]+\\.[0-9]+\\.[0-9]+-beta[0-9]+$"))) | first | .tag_name') - LATEST_RC=$(gh api repos/Chia-Network/bladebit/releases --jq 'map(select(.prerelease) | select(.tag_name | test("^v[0-9]+\\.[0-9]+\\.[0-9]+-rc[0-9]+$"))) | first | .tag_name') - - # Compare the versions and choose the newest that matches the requirements - if [[ "$TAG_TYPE" == "beta" || -z "$TAG_TYPE" ]]; then - # For beta or dev builds (indicated by the absence of a tag), use the latest version available - LATEST_VERSION=$(printf "%s\n%s\n%s\n" "$LATEST_RELEASE" "$LATEST_BETA" "$LATEST_RC" | sed '/-/!s/$/_/' | sort -V | sed 's/_$//' | tail -n 1) - elif [[ "$TAG_TYPE" == "rc" ]]; then - # For RC builds, use the latest RC or full release if it's newer - LATEST_VERSION=$(printf "%s\n%s\n" "$LATEST_RELEASE" "$LATEST_RC" | sed '/-/!s/$/_/' | sort -V | sed 's/_$//' | tail -n 1) - else - # For full releases, use the latest full release - LATEST_VERSION="$LATEST_RELEASE" - fi - echo "LATEST_VERSION=$LATEST_VERSION" >> "$GITHUB_ENV" - - - name: Get latest bladebit plotter - shell: bash - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - # Download and extract the chosen version - mkdir "$GITHUB_WORKSPACE"/bladebit - cd "$GITHUB_WORKSPACE"/bladebit - gh release download -R Chia-Network/bladebit "$LATEST_VERSION" -p 'bladebit*-${{ matrix.os.bladebit-suffix }}' - find . -maxdepth 1 -name '*.tar.gz' -print0 | xargs -0 -I{} bash -c 'tar -xzf {} && rm {}' - find . -maxdepth 1 -name 'bladebit*' -print0 | xargs -0 -I{} chmod +x {} - cd "$OLDPWD" - - - uses: ./.github/actions/install - with: - python-version: ${{ matrix.python-version }} - development: true - constraints-file-artifact-name: constraints-file-${{ matrix.os.arch-artifact-name }} - - - uses: chia-network/actions/activate-venv@main - - - name: Prepare GUI cache - id: gui-ref - run: | - gui_ref=$(git submodule status chia-blockchain-gui | sed -e 's/^ //g' -e 's/ chia-blockchain-gui.*$//g') - echo "${gui_ref}" - echo "GUI_REF=${gui_ref}" >> "$GITHUB_OUTPUT" - echo "rm -rf ./chia-blockchain-gui" - rm -rf ./chia-blockchain-gui - - - name: Cache GUI - uses: actions/cache@v4 - id: cache-gui - with: - path: ./chia-blockchain-gui - key: ${{ runner.os }}-${{ matrix.os.arch }}-chia-blockchain-gui-${{ steps.gui-ref.outputs.GUI_REF }} - - - if: steps.cache-gui.outputs.cache-hit != 'true' - name: Build GUI - continue-on-error: false - run: | - cd ./build_scripts - bash build_linux_deb-1-gui.sh - - - name: Build .deb package - run: | - ldd --version - cd ./build_scripts - sh build_linux_deb-2-installer.sh ${{ matrix.os.arch }} - - - name: Upload Linux artifacts - uses: actions/upload-artifact@v4 - with: - name: chia-installers-linux-deb-${{ matrix.os.arch-artifact-name }} - path: build_scripts/final_installer/ - - - name: Remove working files to exclude from cache - run: | - rm -rf ./chia-blockchain-gui/packages/gui/daemon - - publish: - name: đŸ“Ļ Publish Installers - uses: ./.github/workflows/reflow-publish-installer.yml - with: - concurrency-name: deb - chia-installer-version: ${{ needs.version.outputs.chia-installer-version }} - chia-dev-version: ${{ needs.version.outputs.chia-dev-version }} - configuration: ${{ toJSON( matrix.configuration ) }} - secrets: inherit - needs: - - version - - build - strategy: - fail-fast: false - matrix: - configuration: - - python-version: ["3.10"] - os: - - matrix: debian - file-type: - name: DEB - extension: deb - glue-name: deb - artifact-platform-name: linux - file-arch-name: - arm: arm64 - intel: amd64 - file-suffix: - arm: "" - intel: "" - names: - cli: - file: chia-blockchain-cli_{0}-1_{2}.deb - dev-file: chia-blockchain-cli_{1}-1_{2}.deb - latest-dev-file: chia-blockchain-cli_{2}_latest_dev.deb - gui: - file: chia-blockchain_{0}_{2}.deb - dev-file: chia-blockchain_{1}_{2}.deb - latest-dev-file: chia-blockchain_{2}_latest_dev.deb - mode: - - name: GUI - matrix: gui - glue-name: gui - - name: CLI - matrix: cli - glue-name: cli - arch: - - name: ARM64 - matrix: arm - artifact-name: arm - glue-name: arm - - name: Intel - matrix: intel - artifact-name: intel - glue-name: intel - - test: - name: Test ${{ matrix.distribution.name }} ${{ matrix.mode.name }} ${{ matrix.arch.name }} - runs-on: ${{ matrix.os.runs-on[matrix.arch.matrix] }} - needs: - - version - - build - container: ${{ matrix.distribution.url }} - strategy: - fail-fast: false - matrix: - os: - - runs-on: - arm: [ubuntu-24.04-arm] - intel: [ubuntu-latest] - distribution: - - name: debian:bookworm - type: debian - # https://packages.debian.org/bookworm/python/python3 (3.11) - url: "docker://debian:bookworm" - - name: ubuntu:jammy (22.04) - type: ubuntu - # https://packages.ubuntu.com/jammy/python3 (22.04, 3.10) - url: "docker://ubuntu:jammy" - - name: ubuntu:noble (24.04) - type: ubuntu - # https://packages.ubuntu.com/noble/python3 (24.04, 3.12) - url: "docker://ubuntu:noble" - mode: - - name: GUI - file: chia-blockchain_*.deb - package: chia-blockchain - - name: CLI - file: chia-blockchain-cli_*.deb - package: chia-blockchain-cli - arch: - - name: ARM64 - matrix: arm - artifact-name: arm - - name: Intel - matrix: intel - artifact-name: intel - - env: - DEBIAN_FRONTEND: noninteractive - - steps: - - uses: Chia-Network/actions/clean-workspace@main - - - name: Download packages - uses: actions/download-artifact@v4 - id: download - with: - name: chia-installers-linux-deb-${{ matrix.arch.artifact-name }} - path: packages - - - name: Update apt repos - run: | - apt-get update --yes - - - name: Install package - run: | - ls -l "${{ steps.download.outputs.download-path }}" - apt-get install --yes libnuma1 "${{ steps.download.outputs.download-path }}"/${{ matrix.mode.file }} - - - name: List /opt/chia contents - run: | - find /opt/chia - - - name: Run chia dev installers test - run: | - chia dev installers test --expected-chia-version "${{ needs.version.outputs.chia-installer-version }}" - - - name: Verify /opt/chia present - run: | - if [ ! -e /opt/chia ] - then - ls -l /opt - false - fi - - - name: Check permissions of /opt/chia/chrome-sandbox - shell: bash - if: matrix.mode.name == 'GUI' - run: | - [ "$(stat -c %a:%G:%U /opt/chia/chrome-sandbox)" == "4755:root:root" ] - - - name: Remove package - run: | - apt-get remove --yes ${{ matrix.mode.package }} - - - name: Verify /opt/chia not present - run: | - if [ -e /opt/chia ] - then - ls -lR /opt/chia - false - fi diff --git a/.github/workflows/build-linux-installer-rpm.yml b/.github/workflows/build-linux-installer-rpm.yml deleted file mode 100644 index 54d8f6f6dca9..000000000000 --- a/.github/workflows/build-linux-installer-rpm.yml +++ /dev/null @@ -1,367 +0,0 @@ -name: đŸ“Ļ🚀 Build Installer - Linux RPM AMD64 - -on: - workflow_dispatch: - inputs: - release_type: - description: "Tagged release testing scenario" - required: false - type: choice - default: "" - options: - - "" - - 9.9.9-b1 - - 9.9.9-rc1 - - 9.9.9 - push: - paths-ignore: - - "**.md" - branches: - - "long_lived/**" - - main - - "release/**" - release: - types: [published] - pull_request: - paths-ignore: - - "**.md" - branches: - - "**" - -concurrency: - group: ${{ github.event_name == 'pull_request' && format('{0}-{1}', github.workflow_ref, github.event.pull_request.number) || github.run_id }} - cancel-in-progress: true - -permissions: - id-token: write - contents: write - -jobs: - version: - uses: ./.github/workflows/reflow-version.yml - with: - release_type: ${{ inputs.release_type }} - - build: - name: Build amd64 RPM - runs-on: ubuntu-latest - needs: - - version - container: - image: chianetwork/rocky8-builder:latest - timeout-minutes: 40 - strategy: - fail-fast: false - matrix: - python-version: ["3.10"] - os: - - arch-artifact-name: intel - - env: - CHIA_INSTALLER_VERSION: ${{ needs.version.outputs.chia-installer-version }} - POETRY_DYNAMIC_VERSIONING_OVERRIDE: "chia-blockchain=${{ needs.version.outputs.chia-installer-version }}" - TAG_TYPE: ${{ needs.version.outputs.tag-type }} - - steps: - - name: Add safe git directory - uses: Chia-Network/actions/git-mark-workspace-safe@main - - - name: Checkout Code - uses: actions/checkout@v5 - with: - fetch-depth: 0 - submodules: recursive - - - uses: Chia-Network/actions/git-ssh-to-https@main - - - name: Cleanup any leftovers that exist from previous runs - run: bash build_scripts/clean-runner.sh || true - - - name: Set Env - uses: Chia-Network/actions/setjobenv@main - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Get latest madmax plotter - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - LATEST_MADMAX=$(gh api repos/Chia-Network/chia-plotter-madmax/releases/latest --jq 'select(.prerelease == false) | .tag_name') - mkdir "$GITHUB_WORKSPACE"/madmax - gh release download -R Chia-Network/chia-plotter-madmax "$LATEST_MADMAX" -p 'chia_plot-*-x86-64' -O "$GITHUB_WORKSPACE"/madmax/chia_plot - gh release download -R Chia-Network/chia-plotter-madmax "$LATEST_MADMAX" -p 'chia_plot_k34-*-x86-64' -O "$GITHUB_WORKSPACE"/madmax/chia_plot_k34 - chmod +x "$GITHUB_WORKSPACE"/madmax/chia_plot - chmod +x "$GITHUB_WORKSPACE"/madmax/chia_plot_k34 - - - name: Fetch bladebit versions - shell: bash - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - # Fetch the latest version of each type - LATEST_RELEASE=$(gh api repos/Chia-Network/bladebit/releases/latest --jq 'select(.prerelease == false) | .tag_name') - LATEST_BETA=$(gh api repos/Chia-Network/bladebit/releases --jq 'map(select(.prerelease) | select(.tag_name | test("^v[0-9]+\\.[0-9]+\\.[0-9]+-beta[0-9]+$"))) | first | .tag_name') - LATEST_RC=$(gh api repos/Chia-Network/bladebit/releases --jq 'map(select(.prerelease) | select(.tag_name | test("^v[0-9]+\\.[0-9]+\\.[0-9]+-rc[0-9]+$"))) | first | .tag_name') - - # Compare the versions and choose the newest that matches the requirements - if [[ "$TAG_TYPE" == "beta" || -z "$TAG_TYPE" ]]; then - # For beta or dev builds (indicated by the absence of a tag), use the latest version available - LATEST_VERSION=$(printf "%s\n%s\n%s\n" "$LATEST_RELEASE" "$LATEST_BETA" "$LATEST_RC" | sed '/-/!s/$/_/' | sort -V | sed 's/_$//' | tail -n 1) - elif [[ "$TAG_TYPE" == "rc" ]]; then - # For RC builds, use the latest RC or full release if it's newer - LATEST_VERSION=$(printf "%s\n%s\n" "$LATEST_RELEASE" "$LATEST_RC" | sed '/-/!s/$/_/' | sort -V | sed 's/_$//' | tail -n 1) - else - # For full releases, use the latest full release - LATEST_VERSION="$LATEST_RELEASE" - fi - echo "LATEST_VERSION=$LATEST_VERSION" >> "$GITHUB_ENV" - - - name: Get latest bladebit plotter - shell: bash - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - # Download and extract the chosen version - mkdir "$GITHUB_WORKSPACE"/bladebit - cd "$GITHUB_WORKSPACE"/bladebit - gh release download -R Chia-Network/bladebit "$LATEST_VERSION" -p 'bladebit*-centos-x86-64.tar.gz' - find . -maxdepth 1 -name '*.tar.gz' -print0 | xargs -0 -I{} bash -c 'tar -xzf {} && rm {}' - find . -maxdepth 1 -name 'bladebit*' -print0 | xargs -0 -I{} chmod +x {} - cd "$OLDPWD" - - - uses: ./.github/actions/install - with: - python-version: ${{ matrix.python-version }} - development: true - constraints-file-artifact-name: constraints-file-${{ matrix.os.arch-artifact-name }} - - - uses: chia-network/actions/activate-venv@main - - - name: Prepare GUI cache - id: gui-ref - run: | - gui_ref=$(git submodule status chia-blockchain-gui | sed -e 's/^ //g' -e 's/ chia-blockchain-gui.*$//g') - echo "${gui_ref}" - echo "GUI_REF=${gui_ref}" >> "$GITHUB_OUTPUT" - echo "rm -rf ./chia-blockchain-gui" - rm -rf ./chia-blockchain-gui - - - name: Cache GUI - uses: actions/cache@v4 - id: cache-gui - with: - path: ./chia-blockchain-gui - key: ${{ runner.os }}-rpm-chia-blockchain-gui-${{ steps.gui-ref.outputs.GUI_REF }} - - - if: steps.cache-gui.outputs.cache-hit != 'true' - name: Build GUI - continue-on-error: false - run: | - cd ./build_scripts - bash build_linux_rpm-1-gui.sh - - - name: Build .rpm package - run: | - ldd --version - cd ./build_scripts - bash build_linux_rpm-2-installer.sh amd64 - - - name: Upload fpm-generated rpm spec files - uses: actions/upload-artifact@v4 - with: - if-no-files-found: error - name: spec - path: | - build_scripts/dist/cli.spec - build_scripts/dist/gui.spec - - - name: Upload Linux artifacts - uses: actions/upload-artifact@v4 - with: - name: chia-installers-linux-rpm-${{ matrix.os.arch-artifact-name }} - path: build_scripts/final_installer/ - - - name: Remove working files to exclude from cache - run: | - rm -rf ./chia-blockchain-gui/packages/gui/daemon - - publish: - name: đŸ“Ļ Publish Installers - uses: ./.github/workflows/reflow-publish-installer.yml - with: - concurrency-name: rpm - chia-installer-version: ${{ needs.version.outputs.chia-installer-version }} - chia-dev-version: ${{ needs.version.outputs.chia-dev-version }} - configuration: ${{ toJSON( matrix.configuration ) }} - secrets: inherit - needs: - - version - - build - strategy: - fail-fast: false - matrix: - configuration: - - python-version: ["3.10"] - os: - - matrix: redhat - file-type: - name: RPM - extension: rpm - glue-name: rpm - artifact-platform-name: linux - file-arch-name: - intel: x86_64 - file-suffix: - arm: "" - intel: "" - names: - cli: - file: chia-blockchain-cli-{0}-1.{2}.rpm - def-file: chia-blockchain-cli-{1}-1.{2}.rpm - latest-dev-file: chia-blockchain-cli-1.{2}_latest_dev.rpm - gui: - file: chia-blockchain-{0}-1.{2}.rpm - def-file: chia-blockchain-{1}-1.{2}.rpm - latest-dev-file: chia-blockchain-1.{2}_latest_dev.rpm - mode: - - name: GUI - matrix: gui - glue-name: gui - - name: CLI - matrix: cli - glue-name: cli - arch: - - name: ARM64 - matrix: arm - artifact-name: arm - glue-name: arm - - name: Intel - matrix: intel - artifact-name: intel - glue-name: intel - exclude: - - os: - matrix: redhat - arch: - matrix: arm - - test: - name: Test ${{ matrix.distribution.name }} ${{ matrix.mode.name }} ${{ matrix.state.name }} - runs-on: ${{ matrix.os }} - needs: - - version - - build - container: ${{ matrix.distribution.url }} - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest] - distribution: - - name: amazonlinux:2023 - type: amazon - url: "docker://amazonlinux:2023" - # bypass this error for now: Problem: The operation would result in removing the following protected packages: systemd-udev - noautoremove: - gui: --noautoremove - - name: fedora:37 - type: fedora - # (37, 3.11) https://packages.fedoraproject.org/search?query=python3&releases=Fedora+37&start=0 - url: "docker://fedora:37" - - name: fedora:38 - type: fedora - # (38, 3.11) https://packages.fedoraproject.org/search?query=python3&releases=Fedora+38&start=0 - url: "docker://fedora:38" - - name: rockylinux:8 - type: rocky - url: "docker://rockylinux:8" - - name: rockylinux:9 - type: rocky - url: "docker://rockylinux:9" - # bypass this error for now: Problem: The operation would result in removing the following protected packages: systemd-udev - noautoremove: - gui: --noautoremove - - name: build image - type: rocky - url: "docker://chianetwork/rocky8-builder:latest" - mode: - - name: GUI - matrix: gui - file: chia-blockchain-[0,1,2,3,4,5,6,7,8,9]*.rpm - package: chia-blockchain - - name: CLI - matrix: cli - file: chia-blockchain-cli-[0,1,2,3,4,5,6,7,8,9]*.rpm - package: chia-blockchain-cli - state: - - name: Dirty - matrix: dirty - - name: Clean - matrix: clean - - steps: - - uses: Chia-Network/actions/clean-workspace@main - - - name: Download packages - uses: actions/download-artifact@v4 - id: download - with: - name: chia-installers-linux-rpm-intel - path: packages - - - name: Dirty the environment for the sake of testing - if: matrix.state.matrix == 'dirty' - run: | - # this has been known to mess up the version detection, the empty directory should be removed - mkdir --parents /opt/chia/chia_blockchain-0.1.dist-info - # making sure that files are not removed - touch /opt/chia/touched - - - name: Install package - run: | - ls -l "${{ steps.download.outputs.download-path }}" - yum install -y numactl-libs "${{ steps.download.outputs.download-path }}"/${{ matrix.mode.file }} - - - name: List /opt/chia contents - run: | - find /opt/chia - - - name: Run chia dev installers test - run: | - chia dev installers test --require-no-madmax --expected-chia-version "${{ needs.version.outputs.chia-installer-version }}" - - - name: Verify /opt/chia present - run: | - if [ ! -e /opt/chia ] - then - ls -l /opt - false - fi - - - name: Remove package - run: | - yum remove -y ${{ matrix.distribution.noautoremove[matrix.mode.matrix] }} ${{ matrix.mode.package }} - - - name: Verify /opt/chia not present - if: matrix.state.matrix == 'clean' - run: | - if [ -e /opt/chia ] - then - ls -lR /opt/chia - false - fi - - - name: Verify /opt/chia contains only touched file - if: matrix.state.matrix == 'dirty' - run: | - ACTUAL=$(ls -a /opt/chia) - EXPECTED=$(echo -e '.\n..\ntouched') - echo " actual: ${ACTUAL}" - echo "expected: ${EXPECTED}" - if [ "${ACTUAL}" != "${EXPECTED}" ] - then - echo " !!! they do not match" - ls -lR /opt/chia - false - else - echo " :] they match" - fi diff --git a/.github/workflows/build-macos-installers.yml b/.github/workflows/build-macos-installers.yml deleted file mode 100644 index 0e4a7068a398..000000000000 --- a/.github/workflows/build-macos-installers.yml +++ /dev/null @@ -1,356 +0,0 @@ -name: đŸ“Ļ🚀 Build Installers - MacOS - -on: - workflow_dispatch: - inputs: - release_type: - description: "Tagged release testing scenario" - required: false - type: choice - default: "" - options: - - "" - - 9.9.9-b1 - - 9.9.9-rc1 - - 9.9.9 - push: - paths-ignore: - - "**.md" - branches: - - "long_lived/**" - - main - - "release/**" - release: - types: [published] - pull_request: - paths-ignore: - - "**.md" - branches: - - "**" - -concurrency: - group: ${{ github.event_name == 'pull_request' && format('{0}-{1}', github.workflow_ref, github.event.pull_request.number) || github.run_id }} - cancel-in-progress: true - -permissions: - id-token: write - contents: write - -jobs: - version: - uses: ./.github/workflows/reflow-version.yml - with: - release_type: ${{ inputs.release_type }} - - build: - name: Build ${{ matrix.os.name }} DMG - runs-on: ${{ matrix.os.runs-on }} - needs: - - version - timeout-minutes: 90 - strategy: - fail-fast: false - matrix: - python-version: ["3.10"] - os: - - runs-on: ${{ github.repository_owner == 'Chia-Network' && 'macos-13-intel' || 'macos-13' }} - name: intel - bladebit-suffix: macos-x86-64.tar.gz - arch-artifact-name: intel - - runs-on: ${{ github.repository_owner == 'Chia-Network' && 'macos-13-arm64' || 'macos-15' }} - name: m1 - bladebit-suffix: macos-arm64.tar.gz - arch-artifact-name: arm - - env: - CHIA_INSTALLER_VERSION: ${{ needs.version.outputs.chia-installer-version }} - POETRY_DYNAMIC_VERSIONING_OVERRIDE: "chia-blockchain=${{ needs.version.outputs.chia-installer-version }}" - TAG_TYPE: ${{ needs.version.outputs.tag-type }} - - steps: - - uses: Chia-Network/actions/clean-workspace@main - - - name: Checkout Code - uses: actions/checkout@v5 - with: - fetch-depth: 0 - submodules: recursive - - - uses: Chia-Network/actions/git-ssh-to-https@main - - - name: Cleanup any leftovers that exist from previous runs - run: bash build_scripts/clean-runner.sh || true - - - name: Set Env - uses: Chia-Network/actions/setjobenv@main - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - MACOSX_DEPLOYMENT_TARGET: 13 - - - name: Test for secrets access - id: check_secrets - shell: bash - run: | - unset HAS_APPLE_SECRET - - if [ -n "$APPLE_SECRET" ]; then HAS_APPLE_SECRET='true' ; fi - echo HAS_APPLE_SECRET=${HAS_APPLE_SECRET} >> "$GITHUB_OUTPUT" - env: - APPLE_SECRET: "${{ secrets.APPLE_DEV_ID_APP }}" - - - name: Setup Python environment - uses: Chia-Network/actions/setup-python@main - with: - python-version: ${{ matrix.python-version }} - - # This will be recreated in the next step - # Done now and at the end of the workflow in case the last workflow fails, and this is still around - - name: Delete keychain if it already exists - run: security delete-keychain signing_temp.keychain || true - - - name: Import Apple app signing certificate - if: steps.check_secrets.outputs.HAS_APPLE_SECRET - uses: Apple-Actions/import-codesign-certs@v5 - with: - p12-file-base64: ${{ secrets.APPLE_DEV_ID_APP }} - p12-password: ${{ secrets.APPLE_DEV_ID_APP_PASS }} - - - name: Get latest madmax plotter - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - LATEST_MADMAX=$(gh api repos/Chia-Network/chia-plotter-madmax/releases/latest --jq 'select(.prerelease == false) | .tag_name') - mkdir "$GITHUB_WORKSPACE"/madmax - gh release download -R Chia-Network/chia-plotter-madmax "$LATEST_MADMAX" -p "chia_plot-$LATEST_MADMAX-macos-${{ matrix.os.name }}" - mv "chia_plot-$LATEST_MADMAX-macos-${{ matrix.os.name }}" "$GITHUB_WORKSPACE"/madmax/chia_plot - gh release download -R Chia-Network/chia-plotter-madmax "$LATEST_MADMAX" -p "chia_plot_k34-$LATEST_MADMAX-macos-${{ matrix.os.name }}" - mv "chia_plot_k34-$LATEST_MADMAX-macos-${{ matrix.os.name }}" "$GITHUB_WORKSPACE"/madmax/chia_plot_k34 - chmod +x "$GITHUB_WORKSPACE"/madmax/chia_plot - chmod +x "$GITHUB_WORKSPACE"/madmax/chia_plot_k34 - - - name: Fetch bladebit versions - shell: bash - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - # Fetch the latest version of each type - LATEST_RELEASE=$(gh api repos/Chia-Network/bladebit/releases/latest --jq 'select(.prerelease == false) | .tag_name') - LATEST_BETA=$(gh api repos/Chia-Network/bladebit/releases --jq 'map(select(.prerelease) | select(.tag_name | test("^v[0-9]+\\.[0-9]+\\.[0-9]+-beta[0-9]+$"))) | first | .tag_name') - LATEST_RC=$(gh api repos/Chia-Network/bladebit/releases --jq 'map(select(.prerelease) | select(.tag_name | test("^v[0-9]+\\.[0-9]+\\.[0-9]+-rc[0-9]+$"))) | first | .tag_name') - - # Compare the versions and choose the newest that matches the requirements - if [[ "$TAG_TYPE" == "beta" || -z "$TAG_TYPE" ]]; then - # For beta or dev builds (indicated by the absence of a tag), use the latest version available - LATEST_VERSION=$(printf "%s\n%s\n%s\n" "$LATEST_RELEASE" "$LATEST_BETA" "$LATEST_RC" | sed '/-/!s/$/_/' | sort -V | sed 's/_$//' | tail -n 1) - elif [[ "$TAG_TYPE" == "rc" ]]; then - # For RC builds, use the latest RC or full release if it's newer - LATEST_VERSION=$(printf "%s\n%s\n" "$LATEST_RELEASE" "$LATEST_RC" | sed '/-/!s/$/_/' | sort -V | sed 's/_$//' | tail -n 1) - else - # For full releases, use the latest full release - LATEST_VERSION="$LATEST_RELEASE" - fi - echo "LATEST_VERSION=$LATEST_VERSION" >> "$GITHUB_ENV" - - - name: Get latest bladebit plotter - shell: bash - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - # Download and extract the chosen version - mkdir "$GITHUB_WORKSPACE"/bladebit - cd "$GITHUB_WORKSPACE"/bladebit - ASSETS=$(gh release view "$LATEST_VERSION" --repo Chia-Network/bladebit --json assets -q '.assets[].name') - if ! echo "$ASSETS" | grep -q 'bladebit.*-${{ matrix.os.bladebit-suffix }}'; then - LATEST_VERSION=v2.0.1 - fi - gh release download -R Chia-Network/bladebit "$LATEST_VERSION" -p 'bladebit*-${{ matrix.os.bladebit-suffix }}' - find . -maxdepth 1 -name '*.tar.gz' -print0 | xargs -0 -I{} bash -c 'tar -xzf {} && rm {}' - find . -maxdepth 1 -name 'bladebit*' -print0 | xargs -0 -I{} chmod +x {} - cd "$OLDPWD" - - - uses: ./.github/actions/install - with: - python-version: ${{ matrix.python-version }} - development: true - constraints-file-artifact-name: constraints-file-${{ matrix.os.arch-artifact-name }} - - - uses: chia-network/actions/activate-venv@main - - - name: Setup Node 20.x - uses: actions/setup-node@v4 - with: - node-version: "20.x" - - - name: Prepare GUI cache - id: gui-ref - run: | - gui_ref=$(git submodule status chia-blockchain-gui | sed -e 's/^ //g' -e 's/ chia-blockchain-gui.*$//g') - echo "${gui_ref}" - echo "GUI_REF=${gui_ref}" >> "$GITHUB_OUTPUT" - echo "rm -rf ./chia-blockchain-gui" - rm -rf ./chia-blockchain-gui - - - name: Cache GUI - uses: actions/cache@v4 - id: cache-gui - with: - path: ./chia-blockchain-gui - key: ${{ runner.os }}-${{ matrix.os.name }}-chia-blockchain-gui-${{ steps.gui-ref.outputs.GUI_REF }} - - - if: steps.cache-gui.outputs.cache-hit != 'true' - name: Build GUI - continue-on-error: false - run: | - cd ./build_scripts - sh build_macos-1-gui.sh - - - name: Build MacOS DMG - env: - NOTARIZE: ${{ steps.check_secrets.outputs.HAS_APPLE_SECRET }} - APPLE_NOTARIZE_USERNAME: "${{ secrets.APPLE_NOTARIZE_USERNAME }}" - APPLE_NOTARIZE_PASSWORD: "${{ secrets.APPLE_NOTARIZE_PASSWORD }}" - APPLE_TEAM_ID: "${{ secrets.APPLE_TEAM_ID }}" - APPLE_DEV_ID_APP: "${{ secrets.APPLE_DEV_ID_APP }}" - APPLE_DEV_ID_APP_PASS: "${{ secrets.APPLE_DEV_ID_APP_PASS }}" - run: | - cd ./build_scripts - sh build_macos-2-installer.sh - - - name: Upload MacOS artifacts - uses: actions/upload-artifact@v4 - with: - name: chia-installers-macos-dmg-${{ matrix.os.arch-artifact-name }} - path: build_scripts/final_installer/ - - - name: Remove working files to exclude from cache - run: | - rm -rf ./chia-blockchain-gui/packages/gui/daemon - - publish: - name: đŸ“Ļ Publish Installers - uses: ./.github/workflows/reflow-publish-installer.yml - with: - concurrency-name: macos - chia-installer-version: ${{ needs.version.outputs.chia-installer-version }} - chia-dev-version: ${{ needs.version.outputs.chia-dev-version }} - configuration: ${{ toJSON( matrix.configuration ) }} - secrets: inherit - needs: - - version - - build - strategy: - fail-fast: false - matrix: - configuration: - - python-version: ["3.10"] - os: - - matrix: macos - file-type: - name: DMG - extension: dmg - glue-name: macos - artifact-platform-name: macos - file-arch-name: - arm: m1 - intel: intel - file-suffix: - arm: "-arm64" - intel: "" - names: - gui: - file: Chia-{0}{3}.dmg - dev-file: Chia-{1}{3}.dmg - latest-dev-file: Chia-{3}_latest_dev.dmg - mode: - - name: GUI - matrix: gui - glue-name: gui - - name: CLI - matrix: cli - glue-name: cli - arch: - - name: ARM64 - matrix: arm - artifact-name: arm - glue-name: arm - - name: Intel - matrix: intel - artifact-name: intel - glue-name: intel - exclude: - - os: - matrix: macos - mode: - matrix: cli - - test: - name: Test ${{ matrix.os.name }} ${{ matrix.arch.name }} - runs-on: ${{ matrix.os.runs-on[matrix.arch.matrix] }} - needs: - - version - - build - strategy: - fail-fast: false - matrix: - os: - - name: 13 - matrix: 13 - runs-on: - intel: ${{ github.repository_owner == 'Chia-Network' && 'macos-13-intel' || 'macos-13' }} - - name: 14 - matrix: 14 - runs-on: - arm: macos-14 - arch: - - name: ARM64 - matrix: arm - artifact-name: arm - - name: Intel - matrix: intel - artifact-name: intel - exclude: - - os: - matrix: 13 - arch: - matrix: arm - - os: - matrix: 14 - arch: - matrix: intel - - steps: - - uses: Chia-Network/actions/clean-workspace@main - - - name: Download packages - uses: actions/download-artifact@v4 - id: download - with: - name: chia-installers-macos-dmg-${{ matrix.arch.artifact-name }} - path: packages - - - name: Mount .dmg - env: - PACKAGE_PATH: artifacts/ - run: | - ls -l "${{ steps.download.outputs.download-path }}" - hdiutil attach "${{ steps.download.outputs.download-path }}"/Chia-*.dmg - - - name: List .dmg contents - run: | - find "/Volumes/Chia "* - - - name: Test for homebrew rpath - if: matrix.arch.name == 'ARM64' - run: | - ! otool -l "/Volumes/Chia "*/Chia.app/Contents/Resources/app.asar.unpacked/daemon/_internal/lib-dynload/_ssl.*darwin.so | grep /opt/homebrew/lib - - - name: Run chia dev installers test - run: | - # TODO: maybe fix this and remove the disable - # shellcheck disable=SC2211 - "/Volumes/Chia "*"/Chia.app/Contents/Resources/app.asar.unpacked/daemon/chia" dev installers test --expected-chia-version "${{ needs.version.outputs.chia-installer-version }}" - - - name: Detach .dmg - if: always() - run: | - hdiutil detach -force "/Volumes/Chia "* diff --git a/.github/workflows/build-windows-installer.yml b/.github/workflows/build-windows-installer.yml deleted file mode 100644 index f15707979a01..000000000000 --- a/.github/workflows/build-windows-installer.yml +++ /dev/null @@ -1,370 +0,0 @@ -name: đŸ“Ļ🚀 Build Installer - Windows 10 - -on: - workflow_dispatch: - inputs: - release_type: - description: "Tagged release testing scenario" - required: false - type: choice - default: "" - options: - - "" - - 9.9.9-b1 - - 9.9.9-rc1 - - 9.9.9 - push: - paths-ignore: - - "**.md" - branches: - - "long_lived/**" - - main - - "release/**" - release: - types: [published] - pull_request: - paths-ignore: - - "**.md" - branches: - - "**" - -concurrency: - group: ${{ github.event_name == 'pull_request' && format('{0}-{1}', github.workflow_ref, github.event.pull_request.number) || github.run_id }} - cancel-in-progress: true - -permissions: - id-token: write - contents: write - -jobs: - version: - uses: ./.github/workflows/reflow-version.yml - with: - release_type: ${{ inputs.release_type }} - - build: - name: Build EXE - runs-on: [windows-2022] - needs: - - version - timeout-minutes: 65 - strategy: - fail-fast: false - matrix: - python-version: ["3.10"] - - env: - CHIA_INSTALLER_VERSION: ${{ needs.version.outputs.chia-installer-version }} - POETRY_DYNAMIC_VERSIONING_OVERRIDE: "chia-blockchain=${{ needs.version.outputs.chia-installer-version }}" - TAG_TYPE: ${{ needs.version.outputs.tag-type }} - - steps: - - name: Checkout Code - uses: actions/checkout@v5 - with: - fetch-depth: 0 - submodules: recursive - - - name: Set Env - uses: Chia-Network/actions/setjobenv@main - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - uses: Chia-Network/actions/git-ssh-to-https@main - - - name: Get npm cache directory - id: npm-cache - shell: bash - run: | - echo "dir=$(npm config get cache)" >> "$GITHUB_OUTPUT" - - - name: Cache npm - uses: actions/cache@v4 - with: - path: ${{ steps.npm-cache.outputs.dir }} - key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-node- - - - uses: chia-network/actions/cache-pip@main - with: - mode: poetry - - - uses: Chia-Network/actions/setup-python@main - name: Install Python ${{ matrix.python-version }} - with: - python-version: ${{ matrix.python-version }} - - - name: Setup Node 20.x - uses: actions/setup-node@v4 - with: - node-version: "20.x" - - - name: Test for secrets access - id: check_secrets - shell: bash - run: | - unset HAS_SIGNING_SECRET - - if [ -n "$SIGNING_SECRET" ]; then HAS_SIGNING_SECRET='true' ; fi - echo "HAS_SIGNING_SECRET=${HAS_SIGNING_SECRET}" >> "$GITHUB_OUTPUT" - env: - SIGNING_SECRET: "${{ secrets.SM_CLIENT_CERT_FILE_B64 }}" - - - name: Setup Certificate - if: steps.check_secrets.outputs.HAS_SIGNING_SECRET - shell: bash - run: | - echo "${{ secrets.SM_CLIENT_CERT_FILE_B64 }}" | base64 --decode > /d/Certificate_pkcs12.p12 - - - name: Set signing variables - if: steps.check_secrets.outputs.HAS_SIGNING_SECRET - shell: bash - run: | - { - echo "SM_HOST=${{ secrets.SM_HOST }}" - echo "SM_API_KEY=${{ secrets.SM_API_KEY }}" - echo "SM_CLIENT_CERT_FILE=D:/Certificate_pkcs12.p12" - echo "SM_CLIENT_CERT_PASSWORD=${{ secrets.SM_CLIENT_CERT_PASSWORD }}" - echo "SM_CODE_SIGNING_CERT_SHA1_HASH=${{ secrets.SM_CODE_SIGNING_CERT_SHA1_HASH }}" - } >> "$GITHUB_ENV" - { - echo "C:/Program Files (x86)/Windows Kits/10/App Certification Kit" - echo "C:/Program Files (x86)/Microsoft SDKs/Windows/v10.0A/bin/NETFX 4.8 Tools" - echo "C:/Program Files/DigiCert/DigiCert One Signing Manager Tools" - } >> "$GITHUB_PATH" - - - name: Setup SSM KSP on windows latest - if: steps.check_secrets.outputs.HAS_SIGNING_SECRET - shell: cmd - run: | - curl -X GET https://download.chia.net/dc/smtools-windows-x64.msi -o smtools-windows-x64.msi - msiexec /i smtools-windows-x64.msi /quiet /qn - smksp_registrar.exe list - smctl.exe keypair ls - C:\Windows\System32\certutil.exe -csp "DigiCert Signing Manager KSP" -key -user - smctl.exe windows certsync --keypair-alias=${{ secrets.SM_CERTKEY_ALIAS }} - - - name: Get latest madmax plotter - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - shell: bash - run: | - LATEST_MADMAX=$(gh api repos/Chia-Network/chia-plotter-madmax/releases/latest --jq 'select(.prerelease == false) | .tag_name') - mkdir "$GITHUB_WORKSPACE"\\madmax - gh release download -R Chia-Network/chia-plotter-madmax "$LATEST_MADMAX" -p 'chia_plot-*.exe' -O "$GITHUB_WORKSPACE"\\madmax\\chia_plot.exe - gh release download -R Chia-Network/chia-plotter-madmax "$LATEST_MADMAX" -p 'chia_plot_k34-*.exe' -O "$GITHUB_WORKSPACE"\\madmax\\chia_plot_k34.exe - - - name: Fetch bladebit versions - shell: bash - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - # Fetch the latest version of each type - LATEST_RELEASE=$(gh api repos/Chia-Network/bladebit/releases/latest --jq 'select(.prerelease == false) | .tag_name') - LATEST_BETA=$(gh api repos/Chia-Network/bladebit/releases --jq 'map(select(.prerelease) | select(.tag_name | test("^v[0-9]+\\.[0-9]+\\.[0-9]+-beta[0-9]+$"))) | first | .tag_name') - LATEST_RC=$(gh api repos/Chia-Network/bladebit/releases --jq 'map(select(.prerelease) | select(.tag_name | test("^v[0-9]+\\.[0-9]+\\.[0-9]+-rc[0-9]+$"))) | first | .tag_name') - - # Compare the versions and choose the newest that matches the requirements - if [[ "$TAG_TYPE" == "beta" || -z "$TAG_TYPE" ]]; then - # For beta or dev builds (indicated by the absence of a tag), use the latest version available - LATEST_VERSION=$(printf "%s\n%s\n%s\n" "$LATEST_RELEASE" "$LATEST_BETA" "$LATEST_RC" | sed '/-/!s/$/_/' | sort -V | sed 's/_$//' | tail -n 1) - elif [[ "$TAG_TYPE" == "rc" ]]; then - # For RC builds, use the latest RC or full release if it's newer - LATEST_VERSION=$(printf "%s\n%s\n" "$LATEST_RELEASE" "$LATEST_RC" | sed '/-/!s/$/_/' | sort -V | sed 's/_$//' | tail -n 1) - else - # For full releases, use the latest full release - LATEST_VERSION="$LATEST_RELEASE" - fi - echo "LATEST_VERSION=$LATEST_VERSION" >> "$GITHUB_ENV" - - - name: Get latest bladebit plotter - shell: bash - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - # Download and extract the chosen version - mkdir "$GITHUB_WORKSPACE\\bladebit" - cd "$GITHUB_WORKSPACE\\bladebit" - gh release download -R Chia-Network/bladebit "$LATEST_VERSION" -p 'bladebit*windows-x86-64.zip' - find . -maxdepth 1 -name '*.zip' -print0 | xargs -0 -I{} bash -c 'unzip {} && rm {}' - cd "$OLDPWD" - - - uses: ./.github/actions/install - with: - python-version: ${{ matrix.python-version }} - development: true - constraints-file-artifact-name: constraints-file-intel - - - uses: chia-network/actions/activate-venv@main - - - name: Prepare GUI cache - id: gui-ref - shell: bash - run: | - gui_ref=$(git submodule status chia-blockchain-gui | sed -e 's/^ //g' -e 's/ chia-blockchain-gui.*$//g') - echo "${gui_ref}" - echo "GUI_REF=${gui_ref}" >> "$GITHUB_OUTPUT" - echo "rm -rf ./chia-blockchain-gui" - rm -rf ./chia-blockchain-gui - - - name: Cache GUI - uses: actions/cache@v4 - id: cache-gui - with: - path: .\chia-blockchain-gui - key: ${{ runner.os }}-chia-blockchain-gui-${{ steps.gui-ref.outputs.GUI_REF }} - - - if: steps.cache-gui.outputs.cache-hit != 'true' - name: Build GUI - shell: pwsh - continue-on-error: false - run: | - cd .\build_scripts - .\build_windows-1-gui.ps1 - - - name: Build Windows installer - shell: pwsh - env: - HAS_SIGNING_SECRET: ${{ steps.check_secrets.outputs.HAS_SIGNING_SECRET }} - run: | - $env:path="C:\Program` Files\Microsoft` Visual` Studio\2022\Enterprise\SDK\ScopeCppSDK\vc15\VC\bin\;$env:path" - $env:path="C:\Program` Files` (x86)\Windows` Kits\10\App` Certification` Kit;$env:path" - cd .\build_scripts - .\build_windows-2-installer.ps1 - - - name: Upload Installer to artifacts - uses: actions/upload-artifact@v4 - with: - name: chia-installers-windows-exe-intel - path: chia-blockchain-gui\release-builds\windows-installer\ - - - name: Remove Windows exe and installer to exclude from cache - shell: pwsh - run: | - Remove-Item .\chia-blockchain-gui\packages\gui\dist -Recurse -Force - Remove-Item .\chia-blockchain-gui\packages\gui\daemon -Recurse -Force - Remove-Item .\chia-blockchain-gui\Chia-win32-x64 -Recurse -Force - Remove-Item .\chia-blockchain-gui\release-builds -Recurse -Force - - publish: - name: đŸ“Ļ Publish Installers - uses: ./.github/workflows/reflow-publish-installer.yml - with: - concurrency-name: windows - chia-installer-version: ${{ needs.version.outputs.chia-installer-version }} - chia-dev-version: ${{ needs.version.outputs.chia-dev-version }} - configuration: ${{ toJSON( matrix.configuration ) }} - secrets: inherit - needs: - - version - - build - strategy: - fail-fast: false - matrix: - configuration: - - python-version: ["3.10"] - os: - - matrix: windows - file-type: - name: EXE - extension: exe - glue-name: windows - artifact-platform-name: windows - file-arch-name: - intel: intel - file-suffix: - arm: "" - intel: "" - names: - gui: - file: ChiaSetup-{0}.exe - dev-file: ChiaSetup-{1}.exe - latest-dev-file: ChiaSetup-latest-dev.exe - mode: - - name: GUI - matrix: gui - glue-name: gui - - name: CLI - matrix: cli - glue-name: cli - arch: - - name: ARM64 - matrix: arm - artifact-name: arm - glue-name: arm - - name: Intel - matrix: intel - artifact-name: intel - glue-name: intel - exclude: - - os: - matrix: windows - arch: - matrix: arm - - os: - matrix: windows - mode: - matrix: cli - - test: - name: Test ${{ matrix.os.name }} - runs-on: ${{ matrix.os.runs-on[matrix.arch.matrix] }} - needs: - - version - - build - strategy: - fail-fast: false - matrix: - os: - - name: 2022 - matrix: 2022 - runs-on: - intel: windows-2022 - - name: 2025 - matrix: 2025 - runs-on: - intel: windows-2025 - arch: - - name: Intel - matrix: intel - - env: - INSTALL_PATH: installed/ - - steps: - - uses: Chia-Network/actions/clean-workspace@main - - - name: Download packages - uses: actions/download-artifact@v4 - with: - name: chia-installers-windows-exe-intel - path: packages - - - name: Install package - shell: pwsh - run: | - dir ./packages/ - $env:INSTALLER_PATH = (Get-ChildItem packages/ChiaSetup-*.exe) - # note that the installer requires the target path use backslashes - $env:RESOLVED_INSTALL_PATH = $ExecutionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath($env:INSTALL_PATH) - Start-Process -Wait -FilePath $env:INSTALLER_PATH -ArgumentList "/S", ("/D=" + $env:RESOLVED_INSTALL_PATH) - echo ====================================== - dir ./ - echo ====================================== - dir ./installed/ - - - name: List installed files - shell: pwsh - run: | - Get-ChildItem -Recurse $env:INSTALL_PATH | Select FullName - - - name: List all files - shell: pwsh - run: | - Get-ChildItem -Recurse $env:INSTALL_PATH | Select FullName - - - name: Run chia dev installers test - shell: pwsh - run: | - & ($env:INSTALL_PATH + "/resources/app.asar.unpacked/daemon/chia.exe") dev installers test --expected-chia-version "${{ needs.version.outputs.chia-installer-version }}" diff --git a/.github/workflows/check-commit-signing.yml b/.github/workflows/check-commit-signing.yml deleted file mode 100644 index c19cf367828c..000000000000 --- a/.github/workflows/check-commit-signing.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: 🚨 Check commit signing - -on: - push: - branches: - - long_lived/** - - main - - release/** - pull_request: - branches: - - "**" - -concurrency: - group: ${{ github.event_name == 'pull_request' && format('{0}-{1}', github.workflow_ref, github.event.pull_request.number) || github.run_id }} - cancel-in-progress: true - -jobs: - check-commit-signing: - name: Check commit signing - runs-on: [ubuntu-latest] - timeout-minutes: 5 - - steps: - - name: Checkout Code - uses: actions/checkout@v5 - with: - fetch-depth: 0 - - - uses: chia-network/actions/check-commit-signing@main diff --git a/.github/workflows/check_wheel_availability.yaml b/.github/workflows/check_wheel_availability.yaml deleted file mode 100644 index 75dc4264c5f0..000000000000 --- a/.github/workflows/check_wheel_availability.yaml +++ /dev/null @@ -1,74 +0,0 @@ -name: 🚨 Check Dependency Artifacts - -on: - push: - branches: - - "long_lived/**" - - main - - "release/**" - release: - types: [published] - pull_request: - branches: - - "**" - -concurrency: - group: ${{ github.event_name == 'pull_request' && format('{0}-{1}', github.workflow_ref, github.event.pull_request.number) || github.run_id }} - cancel-in-progress: true - -jobs: - check_dependency_artifacts: - name: ${{ matrix.os.name }} ${{ matrix.arch.name }} ${{ matrix.python-version }} - runs-on: ${{ matrix.os.runs-on[matrix.arch.matrix] }} - strategy: - fail-fast: false - matrix: - os: - - name: Linux - matrix: linux - runs-on: - intel: ubuntu-latest - arm: ubuntu-24.04-arm - - name: macOS - matrix: macos - runs-on: - intel: ${{ github.repository_owner == 'Chia-Network' && 'macos-13-intel' || 'macos-13' }} - arm: ${{ github.repository_owner == 'Chia-Network' && 'macos-13-arm64' || 'macos-15' }} - - name: Windows - matrix: windows - runs-on: - intel: windows-latest - arch: - - name: ARM64 - matrix: arm - - name: Intel - matrix: intel - python-version: ["3.9", "3.10", "3.11", "3.12"] - exclude: - - os: - matrix: windows - arch: - matrix: arm - - steps: - - uses: Chia-Network/actions/clean-workspace@main - - - name: Checkout Code - uses: actions/checkout@v5 - - - uses: Chia-Network/actions/setup-python@main - with: - python-version: ${{ matrix.python-version }} - - - name: Setup Poetry - if: matrix.os.matrix != 'windows' - run: | - sh setup-poetry.sh ${{ matrix.python-version }} - - - name: Setup Poetry - if: matrix.os.matrix == 'windows' - run: | - ./Setup-poetry.ps1 ${{ matrix.python-version }} - - - name: Check Wheel Availability - run: python build_scripts/check_dependency_artifacts.py diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml deleted file mode 100644 index 3e6442930c8e..000000000000 --- a/.github/workflows/codeql-analysis.yml +++ /dev/null @@ -1,75 +0,0 @@ -# For most projects, this workflow file will not need changing; you simply need -# to commit it to your repository. -# -# You may wish to alter this file to override the set of languages analyzed, -# or to provide custom queries or build logic. -# -# ******** NOTE ******** -# We have attempted to detect the languages in your repository. Please check -# the `language` matrix defined below to confirm you have the correct set of -# supported CodeQL languages. -# -name: 🚨 CodeQL - -on: - push: - branches: - - "long_lived/**" - - main - - "release/**" - pull_request: - # The branches below must be a subset of the branches above - branches: [main] - schedule: - - cron: "34 14 * * 3" - -concurrency: - group: ${{ github.event_name == 'pull_request' && format('{0}-{1}', github.workflow_ref, github.event.pull_request.number) || github.run_id }} - cancel-in-progress: true - -jobs: - analyze: - if: github.repository_owner == 'Chia-Network' - name: Analyze - runs-on: ubuntu-latest - - strategy: - fail-fast: false - matrix: - language: ["python"] - # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] - # Learn more: - # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed - - steps: - - name: Checkout repository - uses: actions/checkout@v5 - - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v3 - with: - languages: ${{ matrix.language }} - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. - # queries: ./path/to/local/query, your-org/your-repo/queries@main - - # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). - # If this step fails, then you should remove it and run the build manually (see below) - - name: Autobuild - uses: github/codeql-action/autobuild@v3 - - # â„šī¸ Command-line programs to run using the OS shell. - # 📚 https://git.io/JvXDl - - # âœī¸ If the Autobuild fails above, remove it and uncomment the following three lines - # and modify them (or add more) to build your code if your project - # uses a compiled language - - #- run: | - # make bootstrap - # make release - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v3 diff --git a/.github/workflows/conflict-check.yml b/.github/workflows/conflict-check.yml deleted file mode 100644 index 6e06a18739a9..000000000000 --- a/.github/workflows/conflict-check.yml +++ /dev/null @@ -1,24 +0,0 @@ -name: 🩹 Conflict Check -on: - # So that PRs touching the same files as the push are updated - push: - branches-ignore: - - "tmp/**" - # So that the `dirtyLabel` is removed if conflicts are resolve - # We recommend `pull_request_target` so that github secrets are available. - # In `pull_request` we wouldn't be able to change labels of fork PRs - pull_request_target: - types: [opened, synchronize, reopened] - -jobs: - main: - runs-on: ubuntu-latest - steps: - - name: check if prs are behind main - uses: Chia-Network/actions/label-conflict@main - with: - labelToAddOnConflict: "merge_conflict" - secretToken: "${{ secrets.GITHUB_TOKEN }}" - # targeting 2 minutes of retry, longest observed window thus far is ~30 seconds - retryIntervalSec: 5 - retryMax: 24 diff --git a/.github/workflows/dependency-review.yml b/.github/workflows/dependency-review.yml deleted file mode 100644 index b7852e3db538..000000000000 --- a/.github/workflows/dependency-review.yml +++ /dev/null @@ -1,26 +0,0 @@ -# Managed by repo-content-updater -# Dependency Review Action -# -# This Action will scan dependency manifest files that change as part of a Pull Request, surfacing known-vulnerable versions of the packages declared or updated in the PR. Once installed, if the workflow run is marked as required, PRs introducing known-vulnerable packages will be blocked from merging. -# -# Source repository: https://github.com/actions/dependency-review-action -# Public documentation: https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement -name: "🚨 Dependency Review" -on: [pull_request] - -permissions: - contents: read - -jobs: - dependency-review: - if: github.repository_owner == 'Chia-Network' - runs-on: ubuntu-latest - steps: - - name: "Checkout Repository" - uses: actions/checkout@v5 - - - name: "Dependency Review" - uses: actions/dependency-review-action@v4 - with: - allow-dependencies-licenses: pkg:pypi/pyinstaller, pkg:pypi/mypy - deny-licenses: AGPL-1.0-only, AGPL-1.0-or-later, AGPL-1.0-or-later, AGPL-3.0-or-later, GPL-1.0-only, GPL-1.0-or-later, GPL-2.0-only, GPL-2.0-or-later, GPL-3.0-only, GPL-3.0-or-later diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml deleted file mode 100644 index 9cff6196c492..000000000000 --- a/.github/workflows/pre-commit.yml +++ /dev/null @@ -1,85 +0,0 @@ -name: 🚨 pre-commit - -on: - pull_request: - push: - branches: - - "long_lived/**" - - main - - "release/**" - -concurrency: - group: ${{ github.event_name == 'pull_request' && format('{0}-{1}', github.workflow_ref, github.event.pull_request.number) || github.run_id }} - cancel-in-progress: true - -jobs: - pre-commit: - name: ${{ matrix.os.name }} ${{ matrix.arch.name }} ${{ matrix.python.major_dot_minor }} - runs-on: ${{ matrix.os.runs-on[matrix.arch.matrix] }} - timeout-minutes: 20 - strategy: - fail-fast: false - matrix: - os: - - name: Linux - matrix: linux - runs-on: - intel: ubuntu-latest - arm: ubuntu-24.04-arm - - name: macOS - matrix: macos - runs-on: - intel: ${{ github.repository_owner == 'Chia-Network' && 'macos-13-intel' || 'macos-13' }} - arm: ${{ github.repository_owner == 'Chia-Network' && 'macos-13-arm64' || 'macos-15' }} - - name: Windows - matrix: windows - runs-on: - intel: windows-latest - arch: - - name: ARM64 - matrix: arm - - name: Intel - matrix: intel - python: - - major_dot_minor: "3.9" - - major_dot_minor: "3.10" - - major_dot_minor: "3.11" - - major_dot_minor: "3.12" - exclude: - - os: - matrix: windows - arch: - matrix: arm - # Back to self hosted mac intel runners, which we have very few of - - os: - matrix: macos - arch: - matrix: intel - - steps: - - name: Clean workspace - uses: Chia-Network/actions/clean-workspace@main - - - uses: Chia-Network/actions/git-mark-workspace-safe@main - - - name: disable git autocrlf - run: | - git config --global core.autocrlf false - - - uses: actions/checkout@v5 - - - uses: Chia-Network/actions/setup-python@main - with: - python-version: ${{ matrix.python.major_dot_minor }} - - - uses: ./.github/actions/install - with: - python-version: ${{ matrix.python.major_dot_minor }} - development: true - - - uses: chia-network/actions/activate-venv@main - - - env: - CHIA_MANAGE_CLVM_CHECK_USE_CACHE: "false" - CHIA_MANAGE_MYPY_CHECK_EXCLUSIONS: "true" - run: pre-commit run --all-files --verbose diff --git a/.github/workflows/reflow-publish-installer.yml b/.github/workflows/reflow-publish-installer.yml deleted file mode 100644 index 2b42259d04dc..000000000000 --- a/.github/workflows/reflow-publish-installer.yml +++ /dev/null @@ -1,161 +0,0 @@ -name: đŸ“Ļ Publish Installer - -on: - workflow_call: - inputs: - concurrency-name: - required: true - type: string - chia-installer-version: - required: true - type: string - chia-dev-version: - required: true - type: string - configuration: - required: true - type: string - -concurrency: - # SHA is added to the end if on `main` to let all main workflows run - group: ${{ github.ref }}-${{ github.workflow }}-${{ inputs.concurrency-name }}-${{ github.event_name }}-${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/') || startsWith(github.ref, 'refs/heads/long_lived/')) && github.sha || '' }} - cancel-in-progress: true - -permissions: - id-token: write - contents: write - -jobs: - publish: - if: github.repository_owner == 'Chia-Network' - name: Publish ${{ matrix.arch.name }} ${{ matrix.mode.name }} ${{ matrix.os.file-type.name }} - runs-on: ubuntu-latest - timeout-minutes: 5 - strategy: - fail-fast: false - matrix: ${{ fromJson(inputs.configuration) }} - - env: - FILE: ${{ format(matrix.os.names[matrix.mode.matrix].file, inputs.chia-installer-version, inputs.chia-dev-version, matrix.os.file-arch-name[matrix.arch.matrix], matrix.os.file-suffix[matrix.arch.matrix]) }} - DEV_FILE: ${{ format(matrix.os.names[matrix.mode.matrix].dev-file, inputs.chia-installer-version, inputs.chia-dev-version, matrix.os.file-arch-name[matrix.arch.matrix], matrix.os.file-suffix[matrix.arch.matrix]) }} - LATEST_DEV_FILE: ${{ format(matrix.os.names[matrix.mode.matrix].latest-dev-file, inputs.chia-installer-version, inputs.chia-dev-version, matrix.os.file-arch-name[matrix.arch.matrix], matrix.os.file-suffix[matrix.arch.matrix]) }} - INSTALL_S3_URL: s3://download.chia.net/install - DEV_S3_URL: s3://download.chia.net/dev - LATEST_DEV_S3_URL: s3://download.chia.net/latest-dev - TORRENT_S3_URL: s3://download.chia.net/torrents/ - TRACKER_URL: udp://tracker.opentrackr.org:1337/announce - - steps: - - uses: Chia-Network/actions/clean-workspace@main - - - uses: Chia-Network/actions/setup-python@main - with: - python-version: ${{ matrix.python-version }} - - - uses: chia-network/actions/create-venv@main - id: create-venv - - - uses: chia-network/actions/activate-venv@main - with: - directories: ${{ steps.create-venv.outputs.activate-venv-directories }} - - - name: Download constraints file - uses: actions/download-artifact@v4 - with: - name: constraints-file-${{ matrix.arch.artifact-name }} - path: venv - - - name: Install utilities - run: | - pip install --constraint venv/constraints.txt py3createtorrent - - - name: Download packages - uses: actions/download-artifact@v4 - with: - name: chia-installers-${{ matrix.os.artifact-platform-name }}-${{ matrix.os.file-type.extension }}-${{ matrix.arch.artifact-name }} - path: artifacts/ - - - name: Set Env - uses: Chia-Network/actions/setjobenv@main - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Test for secrets access - id: check_secrets - run: | - unset HAS_AWS_SECRET - unset HAS_GLUE_SECRET - - if [ -n "$AWS_SECRET" ]; then HAS_AWS_SECRET='true' ; fi - echo HAS_AWS_SECRET=${HAS_AWS_SECRET} >> "$GITHUB_OUTPUT" - - if [ -n "$GLUE_API_URL" ]; then HAS_GLUE_SECRET='true' ; fi - echo HAS_GLUE_SECRET=${HAS_GLUE_SECRET} >> "$GITHUB_OUTPUT" - env: - AWS_SECRET: "${{ secrets.CHIA_AWS_ACCOUNT_ID }}" - GLUE_API_URL: "${{ secrets.GLUE_API_URL }}" - - - name: Configure AWS credentials - if: steps.check_secrets.outputs.HAS_AWS_SECRET - uses: aws-actions/configure-aws-credentials@v4 - with: - role-to-assume: arn:aws:iam::${{ secrets.CHIA_AWS_ACCOUNT_ID }}:role/installer-upload - aws-region: us-west-2 - - - name: Create Checksums - run: | - ls artifacts/ - sha256sum "artifacts/${FILE}" > "artifacts/${FILE}.sha256" - - - name: Upload to s3 - if: steps.check_secrets.outputs.HAS_AWS_SECRET - run: | - ls artifacts/ - aws s3 cp "artifacts/${FILE}" "${DEV_S3_URL}/${DEV_FILE}" - aws s3 cp "artifacts/${FILE}.sha256" "${LATEST_DEV_S3_URL}/${DEV_FILE}.sha256" - - - name: Create torrent - if: env.RELEASE == 'true' && matrix.mode.matrix == 'gui' - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - py3createtorrent -f -t "${TRACKER_URL}" "artifacts/${FILE}" -o "artifacts/${FILE}.torrent" --webseed "https://download.chia.net/install/${FILE}" - gh release upload --repo "${{ github.repository }}" "$RELEASE_TAG" "artifacts/${FILE}.torrent" - - - name: Upload Dev Installer - if: steps.check_secrets.outputs.HAS_AWS_SECRET && github.ref == 'refs/heads/main' - run: | - aws s3 cp "artifacts/${FILE}" "${LATEST_DEV_S3_URL}/${LATEST_DEV_FILE}" - aws s3 cp "artifacts/${FILE}.sha256" "${LATEST_DEV_S3_URL}/${LATEST_DEV_FILE}.sha256" - - - name: Upload Release Files - if: steps.check_secrets.outputs.HAS_AWS_SECRET && env.RELEASE == 'true' - run: | - aws s3 cp "artifacts/${FILE}" "${INSTALL_S3_URL}/" - aws s3 cp "artifacts/${FILE}.sha256" "${INSTALL_S3_URL}/" - - - name: Upload Release Torrent - if: steps.check_secrets.outputs.HAS_AWS_SECRET && env.RELEASE == 'true' && matrix.mode.matrix == 'gui' - run: | - aws s3 cp "artifacts/${FILE}.torrent" "${TORRENT_S3_URL}" - - - name: Upload release artifacts - if: env.RELEASE == 'true' - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - gh release upload \ - --repo "${{ github.repository }}" \ - "$RELEASE_TAG" \ - "artifacts/${FILE}" - - - name: Mark installer complete - uses: Chia-Network/actions/github/glue@main - if: steps.check_secrets.outputs.HAS_GLUE_SECRET && (env.RELEASE == 'true') - env: - REPO_SUFFIX: ${{ env.PRE_RELEASE == 'true' && '-prerelease' || '' }} - with: - json_data: '{"chia_ref": "${{ env.RELEASE_TAG }}"}' - glue_url: "${{ secrets.GLUE_API_URL }}" - glue_project: "${{ env.RFC_REPO }}${{ env.REPO_SUFFIX }}/${{ env.RELEASE_TAG }}" - glue_path: "success/build-${{ matrix.os.glue-name }}-${{ matrix.arch.glue-name }}-${{ matrix.mode.glue-name }}" diff --git a/.github/workflows/reflow-version.yml b/.github/workflows/reflow-version.yml deleted file mode 100644 index 2458374f614c..000000000000 --- a/.github/workflows/reflow-version.yml +++ /dev/null @@ -1,64 +0,0 @@ -name: identify version - -on: - workflow_call: - inputs: - release_type: - description: "Tagged release testing scenario" - required: false - type: string - default: "" - outputs: - chia-dev-version: - value: ${{ jobs.version.outputs.chia-dev-version }} - chia-installer-version: - value: ${{ jobs.version.outputs.chia-installer-version }} - tag-type: - value: ${{ jobs.version.outputs.tag-type }} - -jobs: - version: - name: identify version - runs-on: ubuntu-latest - timeout-minutes: 5 - outputs: - chia-dev-version: ${{ steps.version-number.outputs.chia-dev-version }} - chia-installer-version: ${{ steps.version-number.outputs.chia-installer-version }} - tag-type: ${{ steps.tag-type.outputs.tag-type }} - - steps: - - name: Checkout Code - uses: actions/checkout@v5 - with: - fetch-depth: 0 - - - uses: Chia-Network/actions/git-ssh-to-https@main - - - name: Check tag type - id: tag-type - shell: bash - run: | - REG_B="^[0-9]+\.[0-9]+\.[0-9]+-b[0-9]+$" - REG_RC="^[0-9]+\.[0-9]+\.[0-9]+-rc[0-9]+$" - if [[ "${{ github.event.release.tag_name }}" =~ $REG_B ]] || [[ "${{ inputs.release_type }}" =~ $REG_B ]]; then - TAG_TYPE=beta - elif [[ "${{ github.event.release.tag_name }}" =~ $REG_RC ]] || [[ "${{ inputs.release_type }}" =~ $REG_RC ]]; then - TAG_TYPE=rc - fi - echo "tag-type=${TAG_TYPE}" | tee -a "$$GITHUB_OUTPUT" - - - name: Create installer version number - id: version-number - # TODO figure out better way to handle versioning - run: | - python3 -m venv ../venv - . ../venv/bin/activate - python -m pip install --upgrade pip - pip install poetry "poetry-dynamic-versioning[plugin]" - - VERSION=$(poetry version -s) - echo "chia-installer-version=${VERSION}" >> "$GITHUB_OUTPUT" - GIT_SHORT_HASH=$(echo "${GITHUB_SHA}" | cut -c1-8) - echo "chia-dev-version=${VERSION}-${GIT_SHORT_HASH}" >> "$GITHUB_OUTPUT" - - deactivate diff --git a/.github/workflows/require-labels.yml b/.github/workflows/require-labels.yml deleted file mode 100644 index 630c34035559..000000000000 --- a/.github/workflows/require-labels.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: 🚨 Check PR Labels -on: - pull_request: - types: [opened, labeled, unlabeled, synchronize] -jobs: - check-labels: - if: github.repository_owner == 'Chia-Network' - runs-on: ubuntu-latest - permissions: - checks: write - pull-requests: read - statuses: write - outputs: - status: ${{ steps.check-labels.outputs.status }} - steps: - - id: check-labels - uses: mheap/github-action-required-labels@v5 - with: - mode: exactly - count: 1 - labels: "Added, Changed, Fixed" - exit_type: success - - run: echo SUCCESS - if: steps.check-labels.outputs.status == 'success' - - run: echo FAILURE && exit 1 - if: steps.check-labels.outputs.status == 'failure' diff --git a/.github/workflows/stale-issue.yml b/.github/workflows/stale-issue.yml deleted file mode 100644 index 9a9bdca80d54..000000000000 --- a/.github/workflows/stale-issue.yml +++ /dev/null @@ -1,38 +0,0 @@ -name: "Close stale issues" -on: - schedule: - - cron: "0 11 * * *" - -jobs: - stale: - if: github.repository_owner == 'Chia-Network' - runs-on: ubuntu-latest - steps: - - uses: actions/stale@v9 - with: - operations-per-run: 10000 - ascending: true - days-before-issue-stale: 14 - days-before-issue-close: 7 - days-before-pr-stale: 45 - days-before-pr-close: -1 - exempt-all-pr-milestones: true - exempt-all-issue-milestones: true - exempt-all-assignees: true - stale-issue-label: stale-issue - stale-pr-label: stale-pr - remove-stale-when-updated: true - stale-issue-message: >- - This issue has not been updated in 14 days and is now flagged - as stale. If this issue is still affecting you and in need - of further review, please comment on it with an update to - keep it from auto closing in 7 days. - close-issue-message: >- - This issue was automatically closed because it has been - flagged as stale, and subsequently passed 7 days with no - further activity from the submitter or watchers. - stale-pr-message: >- - This PR has been flagged as stale due to no activity for over - 60 days. It will not be automatically closed, but it has been - given a stale-pr label and should be manually reviewed by the - relevant parties. diff --git a/.github/workflows/start-release.yml b/.github/workflows/start-release.yml deleted file mode 100644 index c05a73e01fbf..000000000000 --- a/.github/workflows/start-release.yml +++ /dev/null @@ -1,39 +0,0 @@ -# Starts a release for the given ref on the Glue API -name: Start Release -on: - workflow_dispatch: - release: - types: [published] - -permissions: - id-token: write - contents: read - -jobs: - start_release: - if: github.repository_owner == 'Chia-Network' - name: Starts release process in Glue API - runs-on: [glue-notify] - steps: - - name: Set Env - uses: Chia-Network/actions/setjobenv@main - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Start pre-release - uses: Chia-Network/actions/github/glue@main - if: "github.event.release.prerelease" - with: - json_data: '{"chia_ref": "${{ env.RELEASE_TAG }}"}' - glue_url: "${{ secrets.GLUE_API_URL }}" - glue_project: "${{ env.RFC_REPO }}-prerelease/${{ env.RELEASE_TAG }}" - glue_path: "start" - - - name: Start release - uses: Chia-Network/actions/github/glue@main - if: "!github.event.release.prerelease" - with: - json_data: '{"chia_ref": "${{ env.RELEASE_TAG }}"}' - glue_url: "${{ secrets.GLUE_API_URL }}" - glue_project: "${{ env.RFC_REPO }}/${{ env.RELEASE_TAG }}" - glue_path: "start" diff --git a/.github/workflows/start-sync-test.yml b/.github/workflows/start-sync-test.yml deleted file mode 100644 index 1bb1c484f9e9..000000000000 --- a/.github/workflows/start-sync-test.yml +++ /dev/null @@ -1,37 +0,0 @@ -# Starts a sync test for every new release (pre-releases included) -name: Start Sync Test - -on: - release: - types: [published] - -permissions: - id-token: write - contents: read - -jobs: - start_release: - if: github.repository_owner == 'Chia-Network' - name: Starts Sync Test - runs-on: ubuntu-latest - steps: - - name: Set Env - uses: Chia-Network/actions/setjobenv@main - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Trigger sync test workflow via github-glue - uses: Chia-Network/actions/github/glue@main - with: - json_data: '{"test_ref": "${{ env.RELEASE_TAG }}"}' - glue_url: "${{ secrets.GLUE_API_URL }}" - glue_project: "sync-test/${{ env.RELEASE_TAG }}" - glue_path: "start" - - - name: Trigger sync test workflow success via github-glue - uses: Chia-Network/actions/github/glue@main - with: - json_data: '{"test_ref": "${{ env.RELEASE_TAG }}"}' - glue_url: "${{ secrets.GLUE_API_URL }}" - glue_project: "sync-test/${{ env.RELEASE_TAG }}" - glue_path: "success/deploy" diff --git a/.github/workflows/super-linter.yml b/.github/workflows/super-linter.yml deleted file mode 100644 index 3f481b304945..000000000000 --- a/.github/workflows/super-linter.yml +++ /dev/null @@ -1,83 +0,0 @@ ---- -########################### -########################### -## Linter GitHub Actions ## -########################### -########################### -name: 🚨 GitHub Super Linter - -# -# Documentation: -# https://github.com/github/super-linter -# https://help.github.com/en/articles/workflow-syntax-for-github-actions -# - -############################# -# Start the job on all push # -############################# -on: - push: - branches: - - "long_lived/**" - - main - - "release/**" - release: - types: [published] - pull_request: - branches: - - "**" - -concurrency: - group: ${{ github.event_name == 'pull_request' && format('{0}-{1}', github.workflow_ref, github.event.pull_request.number) || github.run_id }} - cancel-in-progress: true - -############### -# Set the Job # -############### -jobs: - build: - # Name the Job - name: Lint Code Base - # Set the agent to run on - runs-on: ubuntu-latest - timeout-minutes: 60 - - ################## - # Load all steps # - ################## - steps: - ########################## - # Checkout the code base # - ########################## - - name: Checkout Code - uses: actions/checkout@v5 - with: - fetch-depth: 0 - - ################################ - # Run Linter against code base # - ################################ - - name: Lint Code Base - uses: github/super-linter@v7 - # uses: docker://github/super-linter:v3.10.2 - env: - VALIDATE_ALL_CODEBASE: true - DEFAULT_BRANCH: main - LINTER_RULES_PATH: . - MARKDOWN_CONFIG_FILE: .markdown-lint.yml - VALIDATE_BASH: true - VALIDATE_CSS: true - VALIDATE_DOCKER: true - VALIDATE_GO: true - VALIDATE_HTML: true - VALIDATE_JAVASCRIPT_ES: true - VALIDATE_JSON: true - VALIDATE_MD: true - VALIDATE_POWERSHELL: true - VALIDATE_TYPESCRIPT_ES: true - VALIDATE_YAML: true - DISABLE_ERRORS: false - PYTHONPATH: ${{ github.workspace }}:$PYTHONPATH - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - FILTER_REGEX_EXCLUDE: .*github/ISSUE_TEMPLATE/config.yml -# ACTIONS_RUNNER_DEBUG: true diff --git a/.github/workflows/test-install-scripts.yml b/.github/workflows/test-install-scripts.yml deleted file mode 100644 index 69099dd4a3ad..000000000000 --- a/.github/workflows/test-install-scripts.yml +++ /dev/null @@ -1,260 +0,0 @@ -name: đŸ—ī¸ Test Install Scripts - -on: - push: - paths-ignore: - - "**.md" - branches: - - "long_lived/**" - - main - - "release/**" - release: - types: [published] - pull_request: - paths-ignore: - - "**.md" - branches: - - "**" - -concurrency: - group: ${{ github.event_name == 'pull_request' && format('{0}-{1}', github.workflow_ref, github.event.pull_request.number) || github.run_id }} - cancel-in-progress: true - -jobs: - test_scripts: - name: Native ${{ matrix.os.emoji }} ${{ matrix.arch.emoji }} ${{ matrix.development.name }} - ${{ matrix.editable.name }} - runs-on: ${{ matrix.os.runs-on[matrix.arch.matrix] }} - strategy: - fail-fast: false - matrix: - python: - - major-dot-minor: "3.10" - os: - - name: Linux - emoji: 🐧 - runs-on: - arm: ubuntu-24.04-arm - intel: ubuntu-latest - matrix: linux - - name: macOS - emoji: 🍎 - runs-on: - arm: macos-15 - intel: ${{ github.repository_owner == 'Chia-Network' && 'macos-13-intel' || 'macos-13' }} - matrix: macos - - name: Windows - emoji: đŸĒŸ - runs-on: - intel: windows-latest - matrix: windows - arch: - - name: ARM - emoji: đŸ’Ē - matrix: arm - - name: Intel - emoji: 🌀 - matrix: intel - development: - - name: Non-dev - value: false - - name: Dev - value: true - editable: - - name: Non-edit - value: false - matrix: non-editable - - name: Edit - value: true - matrix: editable - exclude: - - os: - matrix: windows - arch: - matrix: arm - - steps: - - name: Checkout Code - uses: actions/checkout@v5 - with: - fetch-depth: 0 - - - name: Setup Python environment - uses: Chia-Network/actions/setup-python@main - with: - python-version: ${{ matrix.python.major-dot-minor }} - - - uses: ./.github/actions/install - with: - python-version: ${{ matrix.python.major-dot-minor }} - development: ${{ matrix.development.value }} - editable: ${{ matrix.editable.value }} - do-system-installs: true - - - uses: chia-network/actions/activate-venv@main - - - name: Run chia --help - run: | - chia --help - - - name: Run install-gui script (Linux, macOS) - if: matrix.os.matrix != 'windows' - run: | - sh install-gui.sh - - - name: Run install-gui script (Windows) - if: matrix.os.matrix == 'windows' - run: | - ./Install-gui.ps1 - - - name: Collect editable info - id: editable-info - shell: bash - run: | - echo "pre-edit-version=$(chia version)" >> "$GITHUB_OUTPUT" - echo '__version__ = "shooby-doowah"' >> chia/__init__.py - echo "post-edit-version=$(chia version)" >> "$GITHUB_OUTPUT" - - - name: Check editable - if: matrix.editable.matrix == 'editable' - shell: bash - env: - PRE_VERSION: ${{ steps.editable-info.outputs.pre-edit-version }} - POST_VERSION: ${{ steps.editable-info.outputs.post-edit-version }} - run: | - [ "$POST_VERSION" = "shooby-doowah" ] && [ "$PRE_VERSION" != "shooby-doowah" ] - - - name: Check non-editable - if: matrix.editable.matrix == 'non-editable' - shell: bash - env: - PRE_VERSION: ${{ steps.editable-info.outputs.pre-edit-version }} - POST_VERSION: ${{ steps.editable-info.outputs.post-edit-version }} - run: | - [ "$POST_VERSION" != "shooby-doowah" ] && [ "$PRE_VERSION" = "$POST_VERSION" ] - - test_scripts_in_docker: - name: Docker ${{ matrix.distribution.name }} ${{ matrix.arch.name }} - runs-on: ${{ matrix.os.runs-on[matrix.arch.matrix] }} - container: ${{ matrix.distribution.url }} - strategy: - fail-fast: false - matrix: - os: - - name: Linux - matrix: linux - runs-on: - intel: ubuntu-latest - arm: ubuntu-24.04-arm - distribution: - - name: amazonlinux:2023 - type: amazon - url: "docker://amazonlinux:2023" - - name: arch:latest - type: arch - url: "docker://archlinux:latest" - - name: debian:bookworm - type: debian - # https://packages.debian.org/bookworm/python/python3 (3.11) - url: "docker://debian:bookworm" - - name: fedora:37 - type: fedora - # (37, 3.11) https://packages.fedoraproject.org/search?query=python3&releases=Fedora+37&start=0 - url: "docker://fedora:37" - - name: fedora:38 - type: fedora - # (38, 3.11) https://packages.fedoraproject.org/search?query=python3&releases=Fedora+38&start=0 - url: "docker://fedora:38" - - name: rockylinux:8 - type: rocky - url: "docker://rockylinux:8" - - name: rockylinux:9 - type: rocky - url: "docker://rockylinux:9" - - name: ubuntu:jammy (22.04) - type: ubuntu - # https://packages.ubuntu.com/jammy/python3 (22.04, 3.10) - url: "docker://ubuntu:jammy" - - name: ubuntu:noble (24.04) - type: ubuntu - # https://packages.ubuntu.com/noble/python3 (24.04, 3.12) - url: "docker://ubuntu:noble" - arch: - - name: ARM64 - matrix: arm - - name: Intel - matrix: intel - exclude: - - distribution: - type: arch - # TODO: arch brought in glibc 2.41 which became more sensitive around execstack - # which is enabled in libbladebit. fixes will be made to main and this - # should be re-enabled then. - # arch: - # matrix: arm - - steps: - - name: Prepare Amazon Linux - if: ${{ matrix.distribution.type == 'amazon' }} - run: | - yum install --assumeyes git sudo - - - name: Prepare Arch - if: ${{ matrix.distribution.type == 'arch' }} - run: | - pacman --noconfirm -Syu - pacman --noconfirm -S base git sudo openssl-1.1 - # The behavior we follow in install.sh is unique with Arch in that - # we leave it to the user to install the appropriate version of python, - # so we need to install python here in order for the test to succeed. - pacman --noconfirm -U --needed https://archive.archlinux.org/packages/p/python/python-3.12.7-1-x86_64.pkg.tar.zst - - - name: Prepare Debian - if: ${{ matrix.distribution.type == 'debian' }} - env: - DEBIAN_FRONTEND: noninteractive - run: | - apt-get --yes update - apt-get install --yes git lsb-release sudo python3-venv - - - name: Prepare Fedora - if: ${{ matrix.distribution.type == 'fedora' }} - run: | - yum install --assumeyes git - - - name: Prepare Rocky - if: ${{ matrix.distribution.type == 'rocky' }} - run: | - yum install --assumeyes git sudo python39 - - - name: Prepare Ubuntu - if: ${{ matrix.distribution.type == 'ubuntu' }} - env: - DEBIAN_FRONTEND: noninteractive - run: | - apt-get --yes update - apt-get install --yes git lsb-release sudo - MINIMUM=3.9 - if ! apt-get satisfy --yes "python3-venv (>= ${MINIMUM})" - then - apt-get install --yes python${MINIMUM}-venv - fi - - - name: Add safe git directory - run: git config --global --add safe.directory "$GITHUB_WORKSPACE" - - # after installing git so we use that copy - - name: Checkout Code - uses: actions/checkout@v5 - with: - fetch-depth: 0 - - - uses: ./.github/actions/install - with: - development: true - do-system-installs: true - - - uses: chia-network/actions/activate-venv@main - - - name: Run chia --help - run: | - chia --help diff --git a/.github/workflows/test-single.yml b/.github/workflows/test-single.yml index f60e2990e680..69b17e44d614 100644 --- a/.github/workflows/test-single.yml +++ b/.github/workflows/test-single.yml @@ -149,7 +149,7 @@ jobs: python-version: ${{ matrix.python.action }} - name: Create keychain for CI use (macOS) - if: matrix.os.matrix == 'macos' + if: matrix.os.matrix == 'macos' || matrix.os.matrix == 'macos-intel' || matrix.os.matrix == 'macos-intel-github' run: | security create-keychain -p foo chiachain security default-keychain -s chiachain diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 24cf857b6881..c38a50ed9187 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -24,7 +24,7 @@ on: type: string per: description: "individual job scope" - default: "directory" + default: "file" required: false type: choice options: @@ -32,7 +32,7 @@ on: - file only: description: "only run this job" - default: "" + default: "tools/test_legacy_keyring.py" required: false type: string duplicates: @@ -47,7 +47,7 @@ on: type: boolean run-macos-intel: description: "run macOS-intel tests" - default: false + default: true required: false type: boolean run-macos-arm: @@ -89,7 +89,7 @@ jobs: - name: Generate matrix configuration id: configure run: | - python chia/_tests/build-job-matrix.py --per directory --verbose ${{ inputs.only && format('--only {0}', inputs.only) || '' }} ${{ inputs.duplicates > 1 && format('--duplicates {0}', inputs.duplicates) || '' }} ${{ inputs.build-job-matrix-arguments }} > matrix.json + python chia/_tests/build-job-matrix.py --per file --only tools/test_legacy_keyring.py --verbose ${{ inputs.only && format('--only {0}', inputs.only) || '' }} ${{ inputs.duplicates > 1 && format('--duplicates {0}', inputs.duplicates) || '' }} ${{ inputs.build-job-matrix-arguments }} > matrix.json cat matrix.json echo "configuration=$(cat matrix.json)" >> "$GITHUB_OUTPUT" echo matrix_mode=${{ @@ -104,24 +104,27 @@ jobs: || 'main' }} >> "$GITHUB_OUTPUT" - - name: Generate mac intel configuration - id: macintel - run: | - echo mac_intel=${{ - ( github.event_name == 'schedule' || inputs.run-macos-intel ) - || ( github.repository_owner == 'Chia-Network' && github.repository == 'Chia-Network/chia-blockchain' && startsWith(github.ref, 'refs/heads/release/') ) - || ( github.repository_owner == 'Chia-Network' && github.repository == 'Chia-Network/chia-blockchain' && startsWith(github.base_ref, 'release/') ) - && 'true' - || 'false' - }} >> "$GITHUB_OUTPUT" - outputs: configuration: ${{ steps.configure.outputs.configuration }} matrix_mode: ${{ steps.configure.outputs.matrix_mode }} - mac_intel: ${{ steps.macintel.outputs.mac_intel }} + macos-intel-github: + if: github.event_name != 'workflow_dispatch' || inputs.run-macos-arm + uses: ./.github/workflows/test-single.yml + needs: configure + with: + os-emoji: 🍎 + matrix: macos-intel-github + name: macOS Intel GitHub + file_name: macos + concurrency-name: macos-intel-github + configuration: ${{ needs.configure.outputs.configuration }} + matrix_mode: ${{ needs.configure.outputs.matrix_mode }} + runs-on: "macos-13" + arch: intel + arch-emoji: 🌀🐙 macos-intel: - if: needs.configure.outputs.mac_intel == 'true' + if: github.event_name != 'workflow_dispatch' || inputs.run-macos-arm uses: ./.github/workflows/test-single.yml needs: configure with: diff --git a/.github/workflows/trigger-docker-dev.yml b/.github/workflows/trigger-docker-dev.yml deleted file mode 100644 index 8a533255ee1f..000000000000 --- a/.github/workflows/trigger-docker-dev.yml +++ /dev/null @@ -1,55 +0,0 @@ -name: đŸ“Ļ🚀 Trigger Dev Docker Build - -on: - push: - paths-ignore: - - "**.md" - branches: - - "long_lived/**" - - "release/**" - pull_request: - paths-ignore: - - "**.md" - -concurrency: - group: ${{ github.event_name == 'pull_request' && format('{0}-{1}', github.workflow_ref, github.event.pull_request.number) || github.run_id }} - cancel-in-progress: true - -permissions: - id-token: write - contents: read - -jobs: - trigger: - if: github.repository_owner == 'Chia-Network' - name: Trigger building a new dev tag for the chia-docker image - runs-on: ubuntu-latest - steps: - - name: Test for secrets access - id: check_secrets - shell: bash - run: | - unset HAS_SECRET - - if [ -n "$GLUE_API_URL" ]; then HAS_SECRET='true' ; fi - echo HAS_SECRET=${HAS_SECRET} >> "$GITHUB_OUTPUT" - env: - GLUE_API_URL: "${{ secrets.GLUE_API_URL }}" - - - name: Trigger docker dev workflow via github-glue - uses: Chia-Network/actions/github/glue@main - if: steps.check_secrets.outputs.HAS_SECRET - with: - json_data: '{"sha":"${{ github.sha }}"}' - glue_url: "${{ secrets.GLUE_API_URL }}" - glue_project: "docker-build-dev/${{ github.sha }}" - glue_path: "start" - - - name: Trigger docker dev success via github-glue - uses: Chia-Network/actions/github/glue@main - if: steps.check_secrets.outputs.HAS_SECRET - with: - json_data: '{"sha":"${{ github.sha }}"}' - glue_url: "${{ secrets.GLUE_API_URL }}" - glue_project: "docker-build-dev/${{ github.sha }}" - glue_path: "success/build-dev" diff --git a/.github/workflows/trigger-docker-main.yml b/.github/workflows/trigger-docker-main.yml deleted file mode 100644 index 898f366c7c15..000000000000 --- a/.github/workflows/trigger-docker-main.yml +++ /dev/null @@ -1,38 +0,0 @@ -name: đŸ“Ļ🚀 Trigger Main Docker Build - -on: - push: - paths-ignore: - - "**.md" - branches: - - main - -concurrency: - group: ${{ github.event_name == 'pull_request' && format('{0}-{1}', github.workflow_ref, github.event.pull_request.number) || github.run_id }} - cancel-in-progress: true - -permissions: - id-token: write - contents: read - -jobs: - trigger: - if: github.repository_owner == 'Chia-Network' - name: Trigger building a new `main` tag for the chia-docker image - runs-on: ubuntu-latest - steps: - - name: Trigger docker main workflow via github-glue - uses: Chia-Network/actions/github/glue@main - with: - json_data: "{}" - glue_url: "${{ secrets.GLUE_API_URL }}" - glue_project: "docker-build-main/${{ github.sha }}" - glue_path: "start" - - - name: Trigger docker main success via github-glue - uses: Chia-Network/actions/github/glue@main - with: - json_data: "{}" - glue_url: "${{ secrets.GLUE_API_URL }}" - glue_project: "docker-build-main/${{ github.sha }}" - glue_path: "success/build-main" diff --git a/.github/workflows/update-mozilla-ca-cert.yaml b/.github/workflows/update-mozilla-ca-cert.yaml deleted file mode 100644 index 2dbf56f6bfd0..000000000000 --- a/.github/workflows/update-mozilla-ca-cert.yaml +++ /dev/null @@ -1,45 +0,0 @@ -name: Update Mozilla cert.pem Nightly - -on: - schedule: - - cron: "0 11 * * *" - workflow_dispatch: - -permissions: - contents: write - pull-requests: write - -concurrency: - group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }} - cancel-in-progress: true - -jobs: - update_cert: - name: Update Mozilla cert.pem Nightly - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v5 - - - name: Download latest Mozilla CA cert.pem - run: | - curl --silent --show-error --location https://curl.se/ca/cacert.pem -o chia/ssl/cacert.pem - - - name: Set up commit signing - uses: Chia-Network/actions/commit-sign/gpg@main - with: - gpg_private_key: ${{ secrets.CHIA_AUTOMATION_PRIVATE_GPG_KEY }} - passphrase: ${{ secrets.CHIA_AUTOMATION_PRIVATE_GPG_PASSPHRASE }} - - - name: Create Pull Request if cacert.pem changed - uses: peter-evans/create-pull-request@v7 - with: - base: main - commit-message: "Update cacert.pem from Mozilla CA bundle" - title: "Update cacert.pem from Mozilla CA bundle" - body: "Automated update of cacert.pem from https://curl.se/ca/cacert.pem." - branch: update-cacert-pem - add-paths: chia/ssl/cacert.pem - delete-branch: true - committer: "ChiaAutomation " - author: "ChiaAutomation " diff --git a/.github/workflows/upload-pypi-source.yml b/.github/workflows/upload-pypi-source.yml deleted file mode 100644 index 94a563349484..000000000000 --- a/.github/workflows/upload-pypi-source.yml +++ /dev/null @@ -1,226 +0,0 @@ -name: 🚨🚀 Lint and upload source distribution - -on: - push: - paths-ignore: - - "**.md" - branches: - - "long_lived/**" - - main - - "release/**" - release: - types: [published] - pull_request: - paths-ignore: - - "**.md" - branches: - - "**" - -concurrency: - group: ${{ github.event_name == 'pull_request' && format('{0}-{1}', github.workflow_ref, github.event.pull_request.number) || github.run_id }} - cancel-in-progress: true - -permissions: - contents: read - id-token: write - -jobs: - mypy: - if: github.repository_owner == 'Chia-Network' - name: ${{ matrix.os.emoji }} ${{ matrix.arch.emoji }} ${{ matrix.check.name }} - ${{ matrix.os.name }} ${{ matrix.python.major_dot_minor }} - runs-on: ${{ matrix.os.runs-on[matrix.arch.matrix] }} - timeout-minutes: 20 - strategy: - fail-fast: false - matrix: - os: - - name: Linux - matrix: linux - emoji: 🐧 - runs-on: - intel: ubuntu-latest - arm: ubuntu-24.04-arm - - name: macOS - matrix: macos - emoji: 🍎 - runs-on: - intel: macos-13-intel - arm: macos-13-arm64 - - name: Windows - matrix: windows - emoji: đŸĒŸ - runs-on: - intel: windows-latest - arch: - - name: ARM64 - emoji: đŸ’Ē - matrix: arm - - name: Intel - emoji: 🌀 - matrix: intel - python: - - major_dot_minor: "3.9" - - major_dot_minor: "3.10" - - major_dot_minor: "3.11" - - major_dot_minor: "3.12" - check: - - name: mypy - command: | - echo "MYPY VERSION IS: $(mypy --version)" - python manage-mypy.py build-mypy-ini - mypy - exclude: - - os: - matrix: windows - arch: - matrix: arm - # Back to self hosted mac intel runners, which we have very few of - - os: - matrix: macos - arch: - matrix: intel - - steps: - - uses: chia-network/actions/clean-workspace@main - - - name: Add safe git directory - uses: chia-network/actions/git-mark-workspace-safe@main - - - uses: actions/checkout@v5 - with: - fetch-depth: 0 - submodules: recursive - - - uses: chia-network/actions/setup-python@main - with: - python-version: ${{ matrix.python.major_dot_minor }} - - - uses: ./.github/actions/install - with: - python-version: ${{ matrix.python.major_dot_minor }} - development: true - - - uses: chia-network/actions/activate-venv@main - - - name: Check with ${{ matrix.check.name }} - run: | - ${{ matrix.check.command }} - - check: - if: github.repository_owner == 'Chia-Network' - name: ${{ matrix.os.emoji }} ${{ matrix.check.name }} - ${{ matrix.os.name }} ${{ matrix.arch.name }} ${{ matrix.python.major_dot_minor }} - runs-on: ${{ matrix.os.runs-on[matrix.arch.matrix] }} - timeout-minutes: 20 - strategy: - fail-fast: false - matrix: - os: - - name: Linux - matrix: linux - emoji: 🐧 - runs-on: - intel: ubuntu-latest - arm: ubuntu-24.04-arm - arch: - - name: Intel - matrix: intel - python: - - major_dot_minor: "3.10" - check: - - name: ruff - command: ruff format --check --diff . - - name: generated protocol tests - command: | - python3 -m chia._tests.util.build_network_protocol_files - git diff --exit-code - - name: poetry - command: | - .penv/bin/poetry check - - name: actionlint - command: | - bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash) - echo ==== shellcheck version - shellcheck --version - echo ==== actionlint version - ./actionlint --version - echo ==== running actionlint - ./actionlint -color -shellcheck shellcheck - - steps: - - uses: chia-network/actions/clean-workspace@main - - - name: Add safe git directory - uses: chia-network/actions/git-mark-workspace-safe@main - - - uses: actions/checkout@v5 - with: - fetch-depth: 0 - submodules: recursive - - - uses: chia-network/actions/setup-python@main - with: - python-version: ${{ matrix.python.major_dot_minor }} - - - uses: ./.github/actions/install - with: - python-version: ${{ matrix.python.major_dot_minor }} - development: true - - - uses: chia-network/actions/activate-venv@main - - - name: Check with ${{ matrix.check.name }} - run: | - ${{ matrix.check.command }} - - upload_source_dist: - if: github.repository_owner == 'Chia-Network' - name: Lint and Upload source distribution - runs-on: ${{ matrix.os }} - timeout-minutes: 30 - needs: - - mypy - - check - strategy: - matrix: - python: - - major_dot_minor: "3.10" - os: [ubuntu-latest] - - steps: - - name: Add safe git directory - uses: chia-network/actions/git-mark-workspace-safe@main - - - name: Checkout Code - uses: actions/checkout@v5 - with: - fetch-depth: 0 - submodules: recursive - - - uses: Chia-Network/actions/setup-python@main - name: Install Python - with: - python-version: ${{ matrix.python.major_dot_minor }} - - - uses: ./.github/actions/install - with: - python-version: ${{ matrix.python.major_dot_minor }} - development: true - - - uses: chia-network/actions/activate-venv@main - - - name: Build source distribution - run: | - python -m build --outdir dist . - - - name: Upload artifacts - uses: actions/upload-artifact@v4 - with: - name: dist - path: ./dist - - - name: Publish distribution to PyPI - if: startsWith(github.ref, 'refs/tags') - uses: pypa/gh-action-pypi-publish@release/v1 - with: - packages-dir: dist/ - skip-existing: true diff --git a/chia/_tests/tools/test_legacy_keyring.py b/chia/_tests/tools/test_legacy_keyring.py index efe864bc725a..fb5db433533b 100644 --- a/chia/_tests/tools/test_legacy_keyring.py +++ b/chia/_tests/tools/test_legacy_keyring.py @@ -59,24 +59,25 @@ def test_legacy_keyring_format(tmp_dir: Path) -> None: def test_legacy_keyring_cli() -> None: keyring = create_legacy_keyring() result = show() - assert result.exit_code == 1 + assert result.exit_code == 1, result.output assert "No keys found in the legacy keyring." in result.output keys = [] for i in range(5): - keys.append(generate_and_add(keyring)) + new_key = generate_and_add(keyring) + keys.append(new_key) result = show() - assert result.exit_code == 0 + assert result.exit_code == 0, result.output for key in keys: assert key.mnemonic_str() in result.output # Should abort if the prompt gets a `n` result = clear("n") - assert result.exit_code == 1 + assert result.exit_code == 1, result.output assert "Aborted" in result.output # And succeed if the prompt gets a `y` result = clear("y") - assert result.exit_code == 0 + assert result.exit_code == 0, result.output for key in keys: assert key.mnemonic_str() in result.output assert f"{len(keys)} keys removed" in result.output diff --git a/chia/legacy/keyring.py b/chia/legacy/keyring.py index efbd3fbc5b4e..ef407fee21dc 100644 --- a/chia/legacy/keyring.py +++ b/chia/legacy/keyring.py @@ -49,18 +49,23 @@ def create_legacy_keyring() -> LegacyKeyring: def generate_and_add(keyring: LegacyKeyring) -> KeyData: + print("generate_and_add(): entering") key = KeyData.generate() + print(f"generate_and_add(): generated {key=}") index = 0 while True: try: + print(f"generate_and_add(): get_key_data({index=}") get_key_data(keyring, index) index += 1 except KeychainUserNotFound: + print(f"generate_and_add(): KeychainUserNotFound, adding at {index=}") keyring.set_password( DEFAULT_SERVICE, get_private_key_user(DEFAULT_USER, index), bytes(key.public_key).hex() + key.entropy.hex(), ) + print(f"generate_and_add(): returning {key=}") return key