Skip to content

Commit

Permalink
Merge branch 'main' into store_id
Browse files Browse the repository at this point in the history
  • Loading branch information
altendky committed May 9, 2024
2 parents a0ab73c + 480bba5 commit ccea776
Show file tree
Hide file tree
Showing 134 changed files with 4,276 additions and 1,903 deletions.
21 changes: 12 additions & 9 deletions .github/workflows/build-linux-installer-deb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -202,32 +202,32 @@ jobs:
publish:
name: Publish ${{ matrix.os.arch }}
runs-on: ${{ matrix.os.runs-on }}
runs-on: ubuntu-latest
needs:
- build
container: chianetwork/ubuntu-20.04-builder:latest
timeout-minutes: ${{ matrix.os.timeout }}
strategy:
fail-fast: false
matrix:
python-version: ["3.10"]
os:
- runs-on: ubuntu-latest
arch: amd64
- arch: amd64
glue-name: "build-amd64-deb"
timeout: 5
- runs-on: [Linux, ARM64]
arch: arm64
- arch: arm64
glue-name: "build-arm64-deb"
# TOOD: some self hosted runners are exhibiting slow artifact downloads sometimes
timeout: 20
timeout: 5

env:
CHIA_INSTALLER_VERSION: ${{ needs.build.outputs.chia-installer-version }}

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

Expand Down Expand Up @@ -289,7 +289,6 @@ jobs:
aws s3 cp "$GITHUB_WORKSPACE/build_scripts/final_installer/chia-blockchain-cli_${CHIA_INSTALLER_VERSION}-1_${{ matrix.os.arch }}.deb" "s3://download.chia.net/dev/chia-blockchain-cli_${CHIA_DEV_BUILD}-1_${{ matrix.os.arch }}.deb"
- name: Create Checksums
if: env.FULL_RELEASE == 'true' || github.ref == 'refs/heads/main'
run: |
ls "$GITHUB_WORKSPACE"/build_scripts/final_installer/
sha256sum "$GITHUB_WORKSPACE"/build_scripts/final_installer/chia-blockchain_${CHIA_INSTALLER_VERSION}_${{ matrix.os.arch }}.deb > "$GITHUB_WORKSPACE"/build_scripts/final_installer/chia-blockchain_${CHIA_INSTALLER_VERSION}_${{ matrix.os.arch }}.deb.sha256
Expand Down Expand Up @@ -377,6 +376,10 @@ jobs:
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
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/build-linux-installer-rpm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,6 @@ jobs:
runs-on: ubuntu-latest
needs:
- build
container:
image: chianetwork/rocky8-builder:latest
timeout-minutes: 5
strategy:
fail-fast: false
Expand All @@ -221,6 +219,10 @@ jobs:
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

Expand Down Expand Up @@ -283,7 +285,6 @@ jobs:
aws s3 cp "$GITHUB_WORKSPACE"/build_scripts/final_installer/chia-blockchain-cli-${CHIA_INSTALLER_VERSION}-1.x86_64.rpm s3://download.chia.net/dev/chia-blockchain-cli-${CHIA_DEV_BUILD}-1.x86_64.rpm
- name: Create Checksums
if: env.FULL_RELEASE == 'true' || github.ref == 'refs/heads/main'
run: |
ls "$GITHUB_WORKSPACE"/build_scripts/final_installer/
sha256sum "$GITHUB_WORKSPACE"/build_scripts/final_installer/chia-blockchain-${CHIA_INSTALLER_VERSION}-1.x86_64.rpm > "$GITHUB_WORKSPACE"/build_scripts/final_installer/chia-blockchain-${CHIA_INSTALLER_VERSION}-1.x86_64.rpm.sha256
Expand Down
39 changes: 16 additions & 23 deletions .github/workflows/build-macos-installers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ jobs:

publish:
name: Publish ${{ matrix.os.name }} DMG
runs-on: ${{ matrix.os.runs-on }}
runs-on: ubuntu-latest
needs:
- build
timeout-minutes: 5
Expand All @@ -254,12 +254,10 @@ jobs:
matrix:
python-version: ["3.10"]
os:
- runs-on: macos-11
name: intel
- name: intel
file-suffix: ""
glue-name: "build-macos"
- runs-on: [MacOS, ARM64]
name: m1
- name: m1
file-suffix: "-arm64"
glue-name: "build-mac-m1"

Expand Down Expand Up @@ -318,19 +316,10 @@ jobs:
AWS_SECRET: "${{ secrets.CHIA_AWS_ACCOUNT_ID }}"
GLUE_API_URL: "${{ secrets.GLUE_API_URL }}"

- name: Install AWS CLI
if: steps.check_secrets.outputs.HAS_AWS_SECRET
run: |
command -v aws || brew install awscli
- name: Install GH CLI
run: |
command -v gh || brew install gh
- name: Create Checksums
run: |
ls
shasum -a 256 ${{ github.workspace }}/build_scripts/final_installer/Chia-${{ env.CHIA_INSTALLER_VERSION }}${{ matrix.os.file-suffix }}.dmg > ${{ github.workspace }}/build_scripts/final_installer/Chia-${{ env.CHIA_INSTALLER_VERSION }}${{ matrix.os.file-suffix }}.dmg.sha256
shasum -a 256 ${{ github.workspace }}/build_scripts/final_installer/chia-${{ env.CHIA_INSTALLER_VERSION }}${{ matrix.os.file-suffix }}.dmg > ${{ github.workspace }}/build_scripts/final_installer/Chia-${{ env.CHIA_INSTALLER_VERSION }}${{ matrix.os.file-suffix }}.dmg.sha256
- name: Configure AWS credentials
if: steps.check_secrets.outputs.HAS_AWS_SECRET
Expand All @@ -345,29 +334,29 @@ jobs:
GIT_SHORT_HASH=$(echo "${GITHUB_SHA}" | cut -c1-8)
CHIA_DEV_BUILD=${CHIA_INSTALLER_VERSION}-$GIT_SHORT_HASH
echo "CHIA_DEV_BUILD=$CHIA_DEV_BUILD" >> "$GITHUB_ENV"
aws s3 cp ${{ github.workspace }}/build_scripts/final_installer/Chia-${{ env.CHIA_INSTALLER_VERSION }}${{ matrix.os.file-suffix }}.dmg s3://download.chia.net/dev/Chia-${CHIA_DEV_BUILD}${{ matrix.os.file-suffix }}.dmg
aws s3 cp ${{ github.workspace }}/build_scripts/final_installer/chia-${{ env.CHIA_INSTALLER_VERSION }}${{ matrix.os.file-suffix }}.dmg s3://download.chia.net/dev/Chia-${CHIA_DEV_BUILD}${{ matrix.os.file-suffix }}.dmg
- name: Create torrent
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: env.FULL_RELEASE == 'true'
run: |
py3createtorrent -f -t udp://tracker.opentrackr.org:1337/announce ${{ github.workspace }}/build_scripts/final_installer/Chia-${{ env.CHIA_INSTALLER_VERSION }}${{ matrix.os.file-suffix }}.dmg -o ${{ github.workspace }}/build_scripts/final_installer/Chia-${{ env.CHIA_INSTALLER_VERSION }}${{ matrix.os.file-suffix }}.dmg.torrent --webseed https://download.chia.net/install/Chia-${{ env.CHIA_INSTALLER_VERSION }}${{ matrix.os.file-suffix }}.dmg
py3createtorrent -f -t udp://tracker.opentrackr.org:1337/announce ${{ github.workspace }}/build_scripts/final_installer/chia-${{ env.CHIA_INSTALLER_VERSION }}${{ matrix.os.file-suffix }}.dmg -o ${{ github.workspace }}/build_scripts/final_installer/Chia-${{ env.CHIA_INSTALLER_VERSION }}${{ matrix.os.file-suffix }}.dmg.torrent --webseed https://download.chia.net/install/Chia-${{ env.CHIA_INSTALLER_VERSION }}${{ matrix.os.file-suffix }}.dmg
ls ${{ github.workspace }}/build_scripts/final_installer/
gh release upload --repo ${{ github.repository }} $RELEASE_TAG ${{ github.workspace }}/build_scripts/final_installer/Chia-${{ env.CHIA_INSTALLER_VERSION }}${{ matrix.os.file-suffix }}.dmg.torrent
gh release upload --repo ${{ github.repository }} $RELEASE_TAG ${{ github.workspace }}/build_scripts/final_installer/chia-${{ env.CHIA_INSTALLER_VERSION }}${{ matrix.os.file-suffix }}.dmg.torrent
- name: Upload Dev Installer
if: steps.check_secrets.outputs.HAS_AWS_SECRET && github.ref == 'refs/heads/main'
run: |
aws s3 cp ${{ github.workspace }}/build_scripts/final_installer/Chia-${{ env.CHIA_INSTALLER_VERSION }}${{ matrix.os.file-suffix }}.dmg s3://download.chia.net/latest-dev/Chia${{ matrix.os.file-suffix }}_latest_dev.dmg
aws s3 cp ${{ github.workspace }}/build_scripts/final_installer/Chia-${{ env.CHIA_INSTALLER_VERSION }}${{ matrix.os.file-suffix }}.dmg.sha256 s3://download.chia.net/latest-dev/Chia${{ matrix.os.file-suffix }}_latest_dev.dmg.sha256
aws s3 cp ${{ github.workspace }}/build_scripts/final_installer/chia-${{ env.CHIA_INSTALLER_VERSION }}${{ matrix.os.file-suffix }}.dmg s3://download.chia.net/latest-dev/Chia${{ matrix.os.file-suffix }}_latest_dev.dmg
aws s3 cp ${{ github.workspace }}/build_scripts/final_installer/chia-${{ env.CHIA_INSTALLER_VERSION }}${{ matrix.os.file-suffix }}.dmg.sha256 s3://download.chia.net/latest-dev/Chia${{ matrix.os.file-suffix }}_latest_dev.dmg.sha256
- name: Upload Release Files
if: steps.check_secrets.outputs.HAS_AWS_SECRET && env.FULL_RELEASE == 'true'
run: |
aws s3 cp ${{ github.workspace }}/build_scripts/final_installer/Chia-${{ env.CHIA_INSTALLER_VERSION }}${{ matrix.os.file-suffix }}.dmg s3://download.chia.net/install/
aws s3 cp ${{ github.workspace }}/build_scripts/final_installer/Chia-${{ env.CHIA_INSTALLER_VERSION }}${{ matrix.os.file-suffix }}.dmg.sha256 s3://download.chia.net/install/
aws s3 cp ${{ github.workspace }}/build_scripts/final_installer/Chia-${{ env.CHIA_INSTALLER_VERSION }}${{ matrix.os.file-suffix }}.dmg.torrent s3://download.chia.net/torrents/
aws s3 cp ${{ github.workspace }}/build_scripts/final_installer/chia-${{ env.CHIA_INSTALLER_VERSION }}${{ matrix.os.file-suffix }}.dmg s3://download.chia.net/install/
aws s3 cp ${{ github.workspace }}/build_scripts/final_installer/chia-${{ env.CHIA_INSTALLER_VERSION }}${{ matrix.os.file-suffix }}.dmg.sha256 s3://download.chia.net/install/
aws s3 cp ${{ github.workspace }}/build_scripts/final_installer/chia-${{ env.CHIA_INSTALLER_VERSION }}${{ matrix.os.file-suffix }}.dmg.torrent s3://download.chia.net/torrents/
- name: Upload release artifacts
if: env.RELEASE == 'true'
Expand Down Expand Up @@ -414,6 +403,10 @@ jobs:
matrix: 13
runs-on:
intel: macos-13
- name: 14
matrix: 14
runs-on:
arm: macos-14
arch:
- name: ARM64
matrix: arm
Expand Down
17 changes: 4 additions & 13 deletions .github/workflows/build-windows-installer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -260,10 +260,7 @@ jobs:
publish:
name: Publish EXE
runs-on: [windows-2019]
defaults:
run:
shell: bash
runs-on: ubuntu-latest
needs:
- build
timeout-minutes: 5
Expand Down Expand Up @@ -326,12 +323,6 @@ jobs:
AWS_SECRET: "${{ secrets.CHIA_AWS_ACCOUNT_ID }}"
GLUE_API_URL: "${{ secrets.GLUE_API_URL }}"

- name: Install AWS CLI
if: steps.check_secrets.outputs.HAS_AWS_SECRET
shell: pwsh
run: |
msiexec.exe /i https://awscli.amazonaws.com/AWSCLIV2.msi
- name: Configure AWS credentials
if: steps.check_secrets.outputs.HAS_AWS_SECRET
uses: aws-actions/configure-aws-credentials@v4
Expand All @@ -350,10 +341,10 @@ jobs:
aws s3 cp chia-blockchain-gui/release-builds/windows-installer/ChiaSetup-${CHIA_INSTALLER_VERSION}.exe s3://download.chia.net/dev/ChiaSetup-${CHIA_DEV_BUILD}.exe
- name: Create Checksums
shell: pwsh
run: |
certutil.exe -hashfile ${{ github.workspace }}/chia-blockchain-gui/release-builds/windows-installer/ChiaSetup-${{ env.CHIA_INSTALLER_VERSION }}.exe SHA256 > ${{ github.workspace }}/chia-blockchain-gui/release-builds/windows-installer/ChiaSetup-${{ env.CHIA_INSTALLER_VERSION }}.exe.sha256
ls ${{ github.workspace }}/chia-blockchain-gui/release-builds/windows-installer/
ls "$GITHUB_WORKSPACE"/chia-blockchain-gui/release-builds/windows-installer/
sha256sum "$GITHUB_WORKSPACE"/chia-blockchain-gui/release-builds/windows-installer/ChiaSetup-${{ env.CHIA_INSTALLER_VERSION }}.exe > "$GITHUB_WORKSPACE"/chia-blockchain-gui/release-builds/windows-installer/ChiaSetup-${{ env.CHIA_INSTALLER_VERSION }}.exe.sha256
ls "$GITHUB_WORKSPACE"/chia-blockchain-gui/release-builds/windows-installer/
- name: Create torrent
if: env.FULL_RELEASE == 'true'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: macOS
matrix: macos
runs-on:
intel: macos-latest
intel: macos-12
arm: [macos, arm64]
- name: Windows
matrix: windows
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/super-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,14 @@ jobs:
##########################
- name: Checkout Code
uses: actions/checkout@v4
with:
fetch-depth: 0

################################
# Run Linter against code base #
################################
- name: Lint Code Base
uses: github/super-linter@v5
uses: github/super-linter@v6
# uses: docker://github/super-linter:v3.10.2
env:
VALIDATE_ALL_CODEBASE: true
Expand All @@ -73,7 +75,6 @@ jobs:
VALIDATE_JSON: true
VALIDATE_MD: true
VALIDATE_POWERSHELL: true
VALIDATE_SHELL_SHFMT: true
VALIDATE_TYPESCRIPT_ES: true
VALIDATE_YAML: true
DISABLE_ERRORS: false
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/test-install-scripts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ jobs:
- major-dot-minor: "3.10"
os:
- runs-on: macos-latest
matrix: macos
matrix: macos-arm
- runs-on: macos-12
matrix: macos-intel
- runs-on: ubuntu-latest
matrix: linux
- runs-on: windows-latest
Expand Down Expand Up @@ -126,6 +128,10 @@ jobs:
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
Expand All @@ -151,7 +157,7 @@ jobs:
# 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.9.9-1-x86_64.pkg.tar.zst
pacman --noconfirm -U --needed https://archive.archlinux.org/packages/p/python/python-3.11.8-1-x86_64.pkg.tar.zst
- name: Prepare Debian
if: ${{ matrix.distribution.type == 'debian' }}
Expand Down
12 changes: 11 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,17 @@ jobs:
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
cat matrix.json
echo configuration=$(cat matrix.json) >> "$GITHUB_OUTPUT"
echo matrix_mode=${{ ( github.event_name == 'schedule' || inputs.full-python-matrix ) && 'all' || ( github.repository_owner == 'Chia-Network' && github.repository != 'Chia-Network/chia-blockchain' ) && 'limited' || ( github.repository_owner == 'Chia-Network' && github.repository == 'Chia-Network/chia-blockchain' && github.ref == 'refs/heads/main' ) && 'main' || ( github.repository_owner == 'Chia-Network' && github.repository == 'Chia-Network/chia-blockchain' && startsWith(github.ref, 'refs/heads/release/') ) && 'all' || ( github.repository_owner == 'Chia-Network' && github.repository == 'Chia-Network/chia-blockchain' && startsWith(github.base_ref, 'release/') ) && 'all' || 'main' }} >> "$GITHUB_OUTPUT"
echo matrix_mode=${{
( github.repository_owner == 'Chia-Network' && github.repository != 'Chia-Network/chia-blockchain' )
&& 'limited'
|| (
( github.event_name == 'schedule' || inputs.full-python-matrix )
|| ( 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/') )
)
&& 'all'
|| 'main'
}} >> "$GITHUB_OUTPUT"
outputs:
configuration: ${{ steps.configure.outputs.configuration }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/upload-pypi-source.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
matrix: macos
emoji: 🍎
runs-on:
intel: macos-latest
intel: macos-12
arm: [macos, arm64]
- name: Windows
matrix: windows
Expand Down
5 changes: 5 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ repos:
hooks:
- id: prettier
types_or: [ini, json, toml, yaml]
- repo: https://github.com/scop/pre-commit-shfmt
rev: v3.8.0-1
hooks:
- id: shfmt
args: ["--diff", "--write", "-i", "2"]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
Expand Down
2 changes: 2 additions & 0 deletions .repo-content-updater.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
var_overrides:
DEPENDABOT_ACTIONS_REVIEWERS: '["cmmarslender", "altendky"]'

0 comments on commit ccea776

Please sign in to comment.