chia-blockchain/.github/workflows/build-linux-installer.yml

97 lines
2.4 KiB
YAML

name: Linux installer on Python 3.8
on:
push:
branches:
- main
tags:
- '**'
pull_request:
branches:
- '**'
jobs:
build:
name: Linux installer on Python 3.8
runs-on: ${{ matrix.os }}
timeout-minutes: 40
strategy:
fail-fast: false
max-parallel: 4
matrix:
python-version: [3.8]
os: [ubuntu-18.04]
steps:
- name: Cancel previous runs on the same branch
if: ${{ github.ref != 'refs/heads/main' }}
uses: styfle/cancel-workflow-action@0.9.0
with:
access_token: ${{ github.token }}
- name: Checkout Code
uses: actions/checkout@v2
with:
fetch-depth: 0
submodules: recursive
- name: Setup Python environment
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Cache npm
uses: actions/cache@v2.1.6
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Get pip cache dir
id: pip-cache
run: |
echo "::set-output name=dir::$(pip cache dir)"
- name: Cache pip
uses: actions/cache@v2.1.6
with:
# Note that new runners may break this https://github.com/actions/cache/issues/292
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Run install script
env:
INSTALL_PYTHON_VERSION: ${{ matrix.python-version }}
BUILD_VDF_CLIENT: "N"
run: |
sh install.sh
- name: Setup Node 12.x
uses: actions/setup-node@v2.1.5
with:
node-version: '12.x'
- name: Build .deb and .rpm packages
run: |
. ./activate
sudo apt-get -y install rpm
ldd --version
cd ./chia-blockchain-gui
git status
cd ../build_scripts
sh build_linux.sh amd64
- name: Upload Linux artifacts
uses: actions/upload-artifact@v2
with:
name: Linux-Installers
path: ${{ github.workspace }}/build_scripts/final_installer/