Skip to content

Commit

Permalink
Merge branch 'main' into pin_in_lock
Browse files Browse the repository at this point in the history
  • Loading branch information
altendky committed Jul 26, 2024
2 parents 1d37061 + 1843888 commit a229692
Show file tree
Hide file tree
Showing 101 changed files with 5,594 additions and 5,185 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
* @Chia-Network/required-reviewers
/.github/* @Chia-Network/actions-reviewers
/.github/**/* @Chia-Network/actions-reviewers
/PRETTY_GOOD_PRACTICES.md @altendky @Chia-Network/required-reviewers
/pylintrc @altendky @Chia-Network/required-reviewers
/tests/ether.py @altendky @Chia-Network/required-reviewers
11 changes: 3 additions & 8 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,17 @@
- In order to be merged, you must add the most appropriate category Label (Added, Changed, Fixed) to your PR
-->
<!-- Explain why this is an improvement (Does this add missing functionality, improve performance, or reduce complexity?) -->
### Purpose:


### Purpose:

<!-- Does this PR introduce a breaking change? -->
### Current Behavior:


### Current Behavior:

### New Behavior:



<!-- As we aim for complete code coverage, please include details regarding unit, and regression tests -->
### Testing Notes:


### Testing Notes:

<!-- Attach any visual examples, or supporting evidence (attach any .gif/video/console output below) -->
5 changes: 5 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ updates:
interval: "weekly"
day: "tuesday"
open-pull-requests-limit: 10
rebase-strategy: auto
labels:
- dependencies
- go
Expand All @@ -25,6 +26,7 @@ updates:
interval: "weekly"
day: "tuesday"
open-pull-requests-limit: 10
rebase-strategy: disabled
labels:
- dependencies
- python
Expand All @@ -37,6 +39,7 @@ updates:
interval: "weekly"
day: "tuesday"
open-pull-requests-limit: 10
rebase-strategy: auto
labels:
- dependencies
- github_actions
Expand All @@ -49,6 +52,7 @@ updates:
interval: "weekly"
day: "tuesday"
open-pull-requests-limit: 10
rebase-strategy: auto
labels:
- dependencies
- javascript
Expand All @@ -61,6 +65,7 @@ updates:
interval: "weekly"
day: "tuesday"
open-pull-requests-limit: 10
rebase-strategy: auto
labels:
- dependencies
- rust
Expand Down
204 changes: 55 additions & 149 deletions .github/workflows/build-linux-installer-deb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,12 @@ jobs:
arch: amd64
madmax-suffix: "x86-64"
bladebit-suffix: "ubuntu-x86-64.tar.gz"
arch-artifact-name: intel
- runs-on: [Linux, ARM64]
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 }}
Expand Down Expand Up @@ -140,7 +142,7 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
development: true
constraints-file-artifact-name: constraints-file-${{ matrix.os.arch }}
constraints-file-artifact-name: constraints-file-${{ matrix.os.arch-artifact-name }}

- uses: chia-network/actions/activate-venv@main

Expand Down Expand Up @@ -176,164 +178,68 @@ jobs:
- name: Upload Linux artifacts
uses: actions/upload-artifact@v4
with:
name: chia-installers-linux-deb-${{ matrix.os.arch }}
path: ${{ github.workspace }}/build_scripts/final_installer/
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 ${{ matrix.os.arch }}
runs-on: ubuntu-latest
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
timeout-minutes: ${{ matrix.os.timeout }}
strategy:
fail-fast: false
matrix:
python-version: ["3.10"]
os:
- arch: amd64
glue-name: "build-amd64-deb"
timeout: 5
- arch: arm64
glue-name: "build-arm64-deb"
timeout: 5

env:
CHIA_INSTALLER_VERSION: ${{ needs.version.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

- 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.os.arch }}
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-linux-deb-${{ matrix.os.arch }}
path: build_scripts/final_installer/

- name: Set Env
uses: Chia-Network/actions/setjobenv@main
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Test for secrets access
id: check_secrets
shell: bash
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: Upload to s3
if: steps.check_secrets.outputs.HAS_AWS_SECRET
run: |
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-blockchain_${CHIA_INSTALLER_VERSION}_${{ matrix.os.arch }}.deb" "s3://download.chia.net/dev/chia-blockchain_${CHIA_DEV_BUILD}_${{ matrix.os.arch }}.deb"
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
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
sha256sum "$GITHUB_WORKSPACE"/build_scripts/final_installer/chia-blockchain-cli_${CHIA_INSTALLER_VERSION}-1_${{ matrix.os.arch }}.deb > "$GITHUB_WORKSPACE"/build_scripts/final_installer/chia-blockchain-cli_${CHIA_INSTALLER_VERSION}-1_${{ matrix.os.arch }}.deb.sha256
ls "$GITHUB_WORKSPACE"/build_scripts/final_installer/
- name: Create .deb torrent
if: env.FULL_RELEASE == 'true'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
py3createtorrent -f -t udp://tracker.opentrackr.org:1337/announce "$GITHUB_WORKSPACE"/build_scripts/final_installer/chia-blockchain_${CHIA_INSTALLER_VERSION}_${{ matrix.os.arch }}.deb -o "$GITHUB_WORKSPACE"/build_scripts/final_installer/chia-blockchain_${CHIA_INSTALLER_VERSION}_${{ matrix.os.arch }}.deb.torrent --webseed https://download.chia.net/install/chia-blockchain_${CHIA_INSTALLER_VERSION}_${{ matrix.os.arch }}.deb
py3createtorrent -f -t udp://tracker.opentrackr.org:1337/announce "$GITHUB_WORKSPACE"/build_scripts/final_installer/chia-blockchain-cli_${CHIA_INSTALLER_VERSION}-1_${{ matrix.os.arch }}.deb -o "$GITHUB_WORKSPACE"/build_scripts/final_installer/chia-blockchain-cli_${CHIA_INSTALLER_VERSION}-1_${{ matrix.os.arch }}.deb.torrent --webseed https://download.chia.net/install/chia-blockchain-cli_${CHIA_INSTALLER_VERSION}-1_${{ matrix.os.arch }}.deb
gh release upload --repo ${{ github.repository }} $RELEASE_TAG "$GITHUB_WORKSPACE"/build_scripts/final_installer/chia-blockchain_${CHIA_INSTALLER_VERSION}_${{ matrix.os.arch }}.deb.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-blockchain_${CHIA_INSTALLER_VERSION}_${{ matrix.os.arch }}.deb s3://download.chia.net/latest-dev/chia-blockchain_${{ matrix.os.arch }}_latest_dev.deb
aws s3 cp "$GITHUB_WORKSPACE"/build_scripts/final_installer/chia-blockchain_${CHIA_INSTALLER_VERSION}_${{ matrix.os.arch }}.deb.sha256 s3://download.chia.net/latest-dev/chia-blockchain_${{ matrix.os.arch }}_latest_dev.deb.sha256
aws s3 cp "$GITHUB_WORKSPACE"/build_scripts/final_installer/chia-blockchain-cli_${CHIA_INSTALLER_VERSION}-1_${{ matrix.os.arch }}.deb s3://download.chia.net/latest-dev/chia-blockchain-cli_${{ matrix.os.arch }}_latest_dev.deb
aws s3 cp "$GITHUB_WORKSPACE"/build_scripts/final_installer/chia-blockchain-cli_${CHIA_INSTALLER_VERSION}-1_${{ matrix.os.arch }}.deb.sha256 s3://download.chia.net/latest-dev/chia-blockchain-cli_${{ matrix.os.arch }}_latest_dev.deb.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-blockchain_${CHIA_INSTALLER_VERSION}_${{ matrix.os.arch }}.deb s3://download.chia.net/install/
aws s3 cp "$GITHUB_WORKSPACE"/build_scripts/final_installer/chia-blockchain_${CHIA_INSTALLER_VERSION}_${{ matrix.os.arch }}.deb.sha256 s3://download.chia.net/install/
aws s3 cp "$GITHUB_WORKSPACE"/build_scripts/final_installer/chia-blockchain_${CHIA_INSTALLER_VERSION}_${{ matrix.os.arch }}.deb.torrent s3://download.chia.net/torrents/
aws s3 cp "$GITHUB_WORKSPACE"/build_scripts/final_installer/chia-blockchain-cli_${CHIA_INSTALLER_VERSION}-1_${{ matrix.os.arch }}.deb s3://download.chia.net/install/
aws s3 cp "$GITHUB_WORKSPACE"/build_scripts/final_installer/chia-blockchain-cli_${CHIA_INSTALLER_VERSION}-1_${{ matrix.os.arch }}.deb.sha256 s3://download.chia.net/install/
aws s3 cp "$GITHUB_WORKSPACE"/build_scripts/final_installer/chia-blockchain-cli_${CHIA_INSTALLER_VERSION}-1_${{ matrix.os.arch }}.deb.torrent s3://download.chia.net/torrents/
- name: Upload release artifacts
if: env.RELEASE == 'true'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release upload \
--repo ${{ github.repository }} \
$RELEASE_TAG \
build_scripts/final_installer/chia-blockchain_${CHIA_INSTALLER_VERSION}_${{ matrix.os.arch }}.deb \
build_scripts/final_installer/chia-blockchain-cli_${CHIA_INSTALLER_VERSION}-1_${{ matrix.os.arch }}.deb
- name: Mark pre-release installer complete
uses: Chia-Network/actions/github/glue@main
if: steps.check_secrets.outputs.HAS_GLUE_SECRET && env.PRE_RELEASE == 'true'
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: "success/${{ matrix.os.glue-name }}"

- name: Mark release installer complete
uses: Chia-Network/actions/github/glue@main
if: steps.check_secrets.outputs.HAS_GLUE_SECRET && env.FULL_RELEASE == 'true'
with:
json_data: '{"chia_ref": "${{ env.RELEASE_TAG }}"}'
glue_url: "${{ secrets.GLUE_API_URL }}"
glue_project: "${{ env.RFC_REPO }}/${{ env.RELEASE_TAG }}"
glue_path: "success/${{ matrix.os.glue-name }}"
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 }}
Expand Down Expand Up @@ -380,10 +286,10 @@ jobs:
arch:
- name: ARM64
matrix: arm
artifact-name: arm64
artifact-name: arm
- name: Intel
matrix: intel
artifact-name: amd64
artifact-name: intel

env:
DEBIAN_FRONTEND: noninteractive
Expand Down
Loading

0 comments on commit a229692

Please sign in to comment.