-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Flaxseed
committed
Nov 20, 2021
1 parent
e727267
commit 1745850
Showing
610 changed files
with
4,590 additions
and
11,189 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[flake8] | ||
max-line-length = 120 | ||
exclude = ./typings/**/* | ||
ignore = E203,W503 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,9 +4,8 @@ on: | |
push: | ||
branches: | ||
- main | ||
- protocol_and_cats_rebased | ||
tags: | ||
- '**' | ||
- '**' | ||
pull_request: | ||
branches: | ||
- '**' | ||
|
@@ -15,23 +14,26 @@ jobs: | |
build: | ||
name: Linux ARM64 installer on Python 3.8 | ||
runs-on: [ARM64] | ||
container: chianetwork/ubuntu-18.04-builder:latest | ||
timeout-minutes: 120 | ||
strategy: | ||
fail-fast: false | ||
max-parallel: 4 | ||
matrix: | ||
python-version: [3.8] | ||
os: [ARM64] | ||
|
||
steps: | ||
- name: Reconfigure git to use HTTP authentication | ||
run: > | ||
git config --global url."https://github.com/".insteadOf | ||
ssh://[email protected]/ | ||
- name: Cancel previous runs on the same branch | ||
if: ${{ github.ref != 'refs/heads/main' }} | ||
uses: styfle/[email protected] | ||
with: | ||
access_token: ${{ github.token }} | ||
|
||
- uses: Chia-Network/actions/clean-workspace@main | ||
|
||
- name: Checkout Code | ||
uses: actions/checkout@v2 | ||
with: | ||
|
@@ -48,18 +50,49 @@ jobs: | |
python3 -m venv ../venv | ||
. ../venv/bin/activate | ||
pip3 install setuptools_scm | ||
echo "::set-output name=CHIA_INSTALLER_VERSION::$(python3 ./build_scripts/installer-version.py)" | ||
echo "::set-output name=FLAX_INSTALLER_VERSION::$(python3 ./build_scripts/installer-version.py)" | ||
deactivate | ||
- name: Test for secrets access | ||
id: check_secrets | ||
shell: bash | ||
# Get the most recent release from chia-plotter-madmax | ||
- uses: actions/github-script@v4 | ||
id: 'latest-madmax' | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
result-encoding: string | ||
script: | | ||
const releases = await github.repos.listReleases({ | ||
owner: 'Chia-Network', | ||
repo: 'chia-plotter-madmax', | ||
}); | ||
return releases.data[0].tag_name; | ||
- name: Get latest madmax plotter | ||
run: | | ||
unset HAS_SECRET | ||
if [ -n "$SECRET" ]; then HAS_SECRET='true' ; fi | ||
echo ::set-output name=HAS_SECRET::${HAS_SECRET} | ||
env: | ||
SECRET: "${{ secrets.INSTALLER_UPLOAD_SECRET }}" | ||
mkdir "$GITHUB_WORKSPACE/madmax" | ||
wget -O "$GITHUB_WORKSPACE/madmax/flax_plot" https://github.com/Chia-Network/chia-plotter-madmax/releases/download/${{ steps.latest-madmax.outputs.result }}/chia_plot-${{ steps.latest-madmax.outputs.result }}-arm64 | ||
wget -O "$GITHUB_WORKSPACE/madmax/flax_plot_k34" https://github.com/Chia-Network/chia-plotter-madmax/releases/download/${{ steps.latest-madmax.outputs.result }}/chia_plot_k34-${{ steps.latest-madmax.outputs.result }}-arm64 | ||
chmod +x "$GITHUB_WORKSPACE/madmax/flax_plot" | ||
chmod +x "$GITHUB_WORKSPACE/madmax/flax_plot_k34" | ||
# Get the most recent release from bladebit | ||
- uses: actions/github-script@v4 | ||
id: 'latest-bladebit' | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
result-encoding: string | ||
script: | | ||
const releases = await github.repos.listReleases({ | ||
owner: 'Chia-Network', | ||
repo: 'bladebit', | ||
}); | ||
return releases.data[0].tag_name; | ||
- name: Get latest bladebit plotter | ||
run: | | ||
mkdir "$GITHUB_WORKSPACE/bladebit" | ||
wget -O /tmp/bladebit.tar.gz https://github.com/Chia-Network/bladebit/releases/download/${{ steps.latest-bladebit.outputs.result }}/bladebit-${{ steps.latest-bladebit.outputs.result }}-ubuntu-arm64.tar.gz | ||
tar -xvzf /tmp/bladebit.tar.gz -C $GITHUB_WORKSPACE/bladebit | ||
chmod +x "$GITHUB_WORKSPACE/bladebit/bladebit" | ||
- name: Run install script | ||
env: | ||
|
@@ -72,7 +105,7 @@ jobs: | |
run: | | ||
. ./activate | ||
ldd --version | ||
cd ./chia-blockchain-gui | ||
cd ./flax-blockchain-gui | ||
git status | ||
cd ../build_scripts | ||
sh build_linux_deb.sh arm64 | ||
|
@@ -83,82 +116,15 @@ jobs: | |
name: Linux-ARM-64-Installer | ||
path: ${{ github.workspace }}/build_scripts/final_installer/ | ||
|
||
- name: Configure AWS Credentials | ||
if: steps.check_secrets.outputs.HAS_SECRET | ||
uses: aws-actions/configure-aws-credentials@v1 | ||
with: | ||
aws-access-key-id: ${{ secrets.INSTALLER_UPLOAD_KEY }} | ||
aws-secret-access-key: ${{ secrets.INSTALLER_UPLOAD_SECRET }} | ||
aws-region: us-west-2 | ||
|
||
- name: Upload to s3 | ||
env: | ||
CHIA_INSTALLER_VERSION: ${{ steps.version_number.outputs.CHIA_INSTALLER_VERSION }} | ||
if: steps.check_secrets.outputs.HAS_SECRET | ||
run: | | ||
aws s3 cp "$GITHUB_WORKSPACE/build_scripts/final_installer/chia-blockchain_${CHIA_INSTALLER_VERSION}_arm64.deb" s3://download-chia-net/builds/ | ||
aws s3 cp $GITHUB_WORKSPACE/build_scripts/final_installer/chia-blockchain_${CHIA_INSTALLER_VERSION}_arm64.deb s3://download-chia-net/protocol_and_cats_rebased/ | ||
- name: Create Checksums | ||
if: startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main' || github.ref == 'refs/heads/protocol_and_cats_rebased' | ||
if: startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main' | ||
env: | ||
CHIA_INSTALLER_VERSION: ${{ steps.version_number.outputs.CHIA_INSTALLER_VERSION }} | ||
FLAX_INSTALLER_VERSION: ${{ steps.version_number.outputs.FLAX_INSTALLER_VERSION }} | ||
run: | | ||
ls $GITHUB_WORKSPACE/build_scripts/final_installer/ | ||
sha256sum $GITHUB_WORKSPACE/build_scripts/final_installer/chia-blockchain_${CHIA_INSTALLER_VERSION}_arm64.deb > $GITHUB_WORKSPACE/build_scripts/final_installer/chia-blockchain_${CHIA_INSTALLER_VERSION}_arm64.deb.sha256 | ||
ls $GITHUB_WORKSPACE/build_scripts/final_installer/ | ||
- name: Install py3createtorrent | ||
if: startsWith(github.ref, 'refs/tags/') | ||
run: | | ||
pip3 install py3createtorrent | ||
- name: Create torrent | ||
if: startsWith(github.ref, 'refs/tags/') | ||
env: | ||
CHIA_INSTALLER_VERSION: ${{ steps.version_number.outputs.CHIA_INSTALLER_VERSION }} | ||
run: | | ||
py3createtorrent -f -t udp://tracker.opentrackr.org:1337/announce $GITHUB_WORKSPACE/build_scripts/final_installer/chia-blockchain_${CHIA_INSTALLER_VERSION}_arm64.deb -o $GITHUB_WORKSPACE/build_scripts/final_installer/chia-blockchain_${CHIA_INSTALLER_VERSION}_arm64.deb.torrent --webseed https://download-chia-net.s3.us-west-2.amazonaws.com/install/chia-blockchain_${CHIA_INSTALLER_VERSION}_arm64.deb | ||
sha256sum $GITHUB_WORKSPACE/build_scripts/final_installer/flax-blockchain_${FLAX_INSTALLER_VERSION}_arm64.deb > $GITHUB_WORKSPACE/build_scripts/final_installer/flax-blockchain_${FLAX_INSTALLER_VERSION}_arm64.deb.sha256 | ||
ls $GITHUB_WORKSPACE/build_scripts/final_installer/ | ||
- name: Upload Beta Installer | ||
if: steps.check_secrets.outputs.HAS_SECRET && github.ref == 'refs/heads/main' | ||
env: | ||
CHIA_INSTALLER_VERSION: ${{ steps.version_number.outputs.CHIA_INSTALLER_VERSION }} | ||
run: | | ||
aws s3 cp $GITHUB_WORKSPACE/build_scripts/final_installer/chia-blockchain_${CHIA_INSTALLER_VERSION}_arm64.deb s3://download-chia-net/beta/chia-blockchain_arm64_latest_beta.deb | ||
aws s3 cp $GITHUB_WORKSPACE/build_scripts/final_installer/chia-blockchain_${CHIA_INSTALLER_VERSION}_arm64.deb.sha256 s3://download-chia-net/beta/chia-blockchain_arm64_latest_beta.deb.sha256 | ||
- name: Upload CATs Beta Installer | ||
if: steps.check_secrets.outputs.HAS_SECRET && github.ref == 'refs/heads/protocol_and_cats_rebased' | ||
env: | ||
CHIA_INSTALLER_VERSION: ${{ steps.version_number.outputs.CHIA_INSTALLER_VERSION }} | ||
run: | | ||
aws s3 cp $GITHUB_WORKSPACE/build_scripts/final_installer/chia-blockchain_${CHIA_INSTALLER_VERSION}_arm64.deb s3://download-chia-net/cats-beta-installers/chia-blockchain_arm64_latest_cats_beta.deb | ||
aws s3 cp $GITHUB_WORKSPACE/build_scripts/final_installer/chia-blockchain_${CHIA_INSTALLER_VERSION}_arm64.deb.sha256 s3://download-chia-net/cats-beta-installers/chia-blockchain_arm64_latest_cats_beta.deb.sha256 | ||
- name: Upload Release Files | ||
if: steps.check_secrets.outputs.HAS_SECRET && startsWith(github.ref, 'refs/tags/') | ||
env: | ||
CHIA_INSTALLER_VERSION: ${{ steps.version_number.outputs.CHIA_INSTALLER_VERSION }} | ||
run: | | ||
ls $GITHUB_WORKSPACE/build_scripts/final_installer/ | ||
aws s3 cp $GITHUB_WORKSPACE/build_scripts/final_installer/chia-blockchain_${CHIA_INSTALLER_VERSION}_arm64.deb s3://download-chia-net/install/ | ||
aws s3 cp $GITHUB_WORKSPACE/build_scripts/final_installer/chia-blockchain_${CHIA_INSTALLER_VERSION}_arm64.deb.sha256 s3://download-chia-net/install/ | ||
aws s3 cp $GITHUB_WORKSPACE/build_scripts/final_installer/chia-blockchain_${CHIA_INSTALLER_VERSION}_arm64.deb.torrent s3://download-chia-net/torrents/ | ||
- name: Get tag name | ||
if: startsWith(github.ref, 'refs/tags/') | ||
id: tag-name | ||
run: | | ||
echo "::set-output name=TAG_NAME::$(echo ${{ github.ref }} | cut -d'/' -f 3)" | ||
echo "::set-output name=REPO_NAME::$(echo ${{ github.repository }} | cut -d'/' -f 2)" | ||
- name: Mark installer complete | ||
if: startsWith(github.ref, 'refs/tags/') | ||
run: | | ||
curl -s -XPOST -H "Authorization: Bearer ${{ secrets.GLUE_ACCESS_TOKEN }}" --data '{"chia_ref": "${{ steps.tag-name.outputs.TAG_NAME }}"}' ${{ secrets.GLUE_API_URL }}/api/v1/${{ steps.tag-name.outputs.REPO_NAME }}/${{ steps.tag-name.outputs.TAG_NAME }}/success/build-arm | ||
- name: Clean up on self hosted runner | ||
run: | | ||
sudo rm -rf build_scripts/final_installer |
Oops, something went wrong.