mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 01:43:36 +01:00
github: Update FreeBSD Test
- Passing bitcoind version from matrix - cleanup: Removed extra tabs and `-` from pypi.yml Changelog-Fixed: Github action for FreeBSD setup
This commit is contained in:
parent
3a4dd5f032
commit
382b496c5f
25
.github/workflows/bsd.yml
vendored
25
.github/workflows/bsd.yml
vendored
@ -11,6 +11,10 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
name: Build and test on FreeBSD
|
||||
timeout-minutes: 120
|
||||
strategy:
|
||||
fail-fast: true
|
||||
matrix:
|
||||
bitcoind-version: ["27.1"]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Test in FreeBSD
|
||||
@ -20,9 +24,9 @@ jobs:
|
||||
usesh: true
|
||||
prepare: |
|
||||
pkg install -y \
|
||||
bash \
|
||||
wget \
|
||||
py38-pip \
|
||||
py38-sqlite3 \
|
||||
python38 \
|
||||
gmake \
|
||||
git \
|
||||
python \
|
||||
@ -36,15 +40,15 @@ jobs:
|
||||
lowdown \
|
||||
curl
|
||||
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain nightly-2021-08-3z1
|
||||
python3.8 -m ensurepip
|
||||
python3.8 -m pip install --upgrade pip
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain nightly-2021-08-3z1
|
||||
|
||||
cd /tmp/ || exit 1
|
||||
wget https://bitcoincore.org/bin/bitcoin-core-27.1/bitcoin-27.1-x86_64-linux-gnu.tar.gz
|
||||
tar -xf bitcoin-27.1-x86_64-linux-gnu.tar.bz2
|
||||
sudo mv bitcoin-27.1/bin/* /usr/local/bin
|
||||
rm -rf \
|
||||
bitcoin-27.1-x86_64-linux-gnu.tar.gz \
|
||||
bitcoin-27.1
|
||||
cd /tmp/ || exit 1
|
||||
wget https://bitcoincore.org/bin/bitcoin-core-${{ matrix.bitcoind-version }}/bitcoin-${{ matrix.bitcoind-version }}-x86_64-linux-gnu.tar.gz
|
||||
tar -xf bitcoin-${{ matrix.bitcoind-version }}-x86_64-linux-gnu.tar.bz2
|
||||
sudo mv bitcoin-${{ matrix.bitcoind-version }}/bin/* /usr/local/bin
|
||||
rm -rf bitcoin-${{ matrix.bitcoind-version }}-x86_64-linux-gnu.tar.gz bitcoin-${{ matrix.bitcoind-version }}
|
||||
|
||||
run: |
|
||||
PATH=/root/.local/bin:$PATH
|
||||
@ -84,4 +88,3 @@ jobs:
|
||||
|
||||
# Clean up to maximize rsync's chances of succeeding
|
||||
gmake clean
|
||||
|
||||
|
146
.github/workflows/pypi.yml
vendored
146
.github/workflows/pypi.yml
vendored
@ -1,79 +1,79 @@
|
||||
---
|
||||
name: Publish Python 🐍 distributions 📦 to PyPI and TestPyPI
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
'^v[0-9]{2}\.[0-9]{2}(\.[0-9]{1,2})?$'
|
||||
workflow_dispatch:
|
||||
jobs:
|
||||
deploy:
|
||||
name: Build and publish ${{ matrix.package }} 🐍
|
||||
runs-on: ubuntu-20.04
|
||||
timeout-minutes: 120
|
||||
strategy:
|
||||
fail-fast: true
|
||||
matrix:
|
||||
include:
|
||||
- PACKAGE: pyln-client
|
||||
WORKDIR: contrib/pyln-client
|
||||
- PACKAGE: pyln-testing
|
||||
WORKDIR: contrib/pyln-testing
|
||||
- PACKAGE: pyln-proto
|
||||
WORKDIR: contrib/pyln-proto
|
||||
- PACKAGE: pyln-grpc-proto
|
||||
WORKDIR: contrib/pyln-grpc-proto
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
# Need to fetch entire history in order to locate the version tag
|
||||
fetch-depth: 0
|
||||
name: Publish Python 🐍 distributions 📦 to PyPI and TestPyPI
|
||||
|
||||
- name: Check version tag
|
||||
run: >-
|
||||
git describe --always --dirty=-modded --abbrev=7
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
'^v[0-9]{2}\.[0-9]{2}(\.[0-9]{1,2})?$'
|
||||
workflow_dispatch:
|
||||
|
||||
- name: Setup Version
|
||||
env:
|
||||
WORKDIR: ${{ matrix.WORKDIR }}
|
||||
run: |
|
||||
echo "VERSION=$(git describe --abbrev=0).post$(git describe --abbrev=1 | awk -F "-" '{print $2}')" >> $GITHUB_ENV
|
||||
jobs:
|
||||
deploy:
|
||||
name: Build and publish ${{ matrix.package }} 🐍
|
||||
runs-on: ubuntu-20.04
|
||||
timeout-minutes: 120
|
||||
strategy:
|
||||
fail-fast: true
|
||||
matrix:
|
||||
include:
|
||||
- PACKAGE: pyln-client
|
||||
WORKDIR: contrib/pyln-client
|
||||
- PACKAGE: pyln-testing
|
||||
WORKDIR: contrib/pyln-testing
|
||||
- PACKAGE: pyln-proto
|
||||
WORKDIR: contrib/pyln-proto
|
||||
- PACKAGE: pyln-grpc-proto
|
||||
WORKDIR: contrib/pyln-grpc-proto
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
# Need to fetch entire history in order to locate the version tag
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Install Poetry
|
||||
env:
|
||||
WORKDIR: ${{ matrix.WORKDIR }}
|
||||
run: |
|
||||
curl -sSL https://install.python-poetry.org | python3 -
|
||||
echo "$HOME/.local/bin" >> $GITHUB_PATH
|
||||
echo "PATH=$HOME/.local/bin:$PATH"
|
||||
- name: Check version tag
|
||||
run: >-
|
||||
git describe --always --dirty=-modded --abbrev=7
|
||||
|
||||
- name: Publish distribution 📦 to Test PyPI
|
||||
if: github.event_name == 'workflow_dispatch' && github.repository == 'ElementsProject/lightning'
|
||||
env:
|
||||
POETRY_PYPI_TOKEN_TESTPYPI: ${{ secrets.TEST_PYPI_API_TOKEN }}
|
||||
WORKDIR: ${{ matrix.WORKDIR }}
|
||||
run: |
|
||||
echo "POETRY VERSION TEST: $(poetry --version)"
|
||||
echo "Pyln* VERSION: $VERSION"
|
||||
cd ${{ env.WORKDIR }}
|
||||
python3 -m pip config set global.timeout 150
|
||||
poetry config repositories.testpypi https://test.pypi.org/legacy/
|
||||
make upgrade-version NEW_VERSION=$VERSION
|
||||
poetry build --no-interaction
|
||||
poetry publish --repository testpypi --no-interaction --skip-existing
|
||||
- name: Setup Version
|
||||
env:
|
||||
WORKDIR: ${{ matrix.WORKDIR }}
|
||||
run: |
|
||||
echo "VERSION=$(git describe --abbrev=0).post$(git describe --abbrev=1 | awk -F "-" '{print $2}')" >> $GITHUB_ENV
|
||||
|
||||
- name: Publish distribution 📦 to PyPI
|
||||
if: startsWith(github.ref, 'refs/tags/v') && github.repository == 'ElementsProject/lightning'
|
||||
env:
|
||||
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_API_TOKEN }}
|
||||
WORKDIR: ${{ matrix.WORKDIR }}
|
||||
run: |
|
||||
echo "POETRY VERSION PUBLISH: $(poetry --version)"
|
||||
echo "Pyln* VERSION: $VERSION"
|
||||
cd ${{ env.WORKDIR }}
|
||||
export VERSION=$(git describe --abbrev=0)
|
||||
make upgrade-version NEW_VERSION=$VERSION
|
||||
python3 -m pip config set global.timeout 150
|
||||
poetry build --no-interaction
|
||||
poetry publish --no-interaction
|
||||
- name: Install Poetry
|
||||
env:
|
||||
WORKDIR: ${{ matrix.WORKDIR }}
|
||||
run: |
|
||||
curl -sSL https://install.python-poetry.org | python3 -
|
||||
echo "$HOME/.local/bin" >> $GITHUB_PATH
|
||||
echo "PATH=$HOME/.local/bin:$PATH"
|
||||
|
||||
- name: Publish distribution 📦 to Test PyPI
|
||||
if: github.event_name == 'workflow_dispatch' && github.repository == 'ElementsProject/lightning'
|
||||
env:
|
||||
POETRY_PYPI_TOKEN_TESTPYPI: ${{ secrets.TEST_PYPI_API_TOKEN }}
|
||||
WORKDIR: ${{ matrix.WORKDIR }}
|
||||
run: |
|
||||
echo "POETRY VERSION TEST: $(poetry --version)"
|
||||
echo "Pyln* VERSION: $VERSION"
|
||||
cd ${{ env.WORKDIR }}
|
||||
python3 -m pip config set global.timeout 150
|
||||
poetry config repositories.testpypi https://test.pypi.org/legacy/
|
||||
make upgrade-version NEW_VERSION=$VERSION
|
||||
poetry build --no-interaction
|
||||
poetry publish --repository testpypi --no-interaction --skip-existing
|
||||
|
||||
- name: Publish distribution 📦 to PyPI
|
||||
if: startsWith(github.ref, 'refs/tags/v') && github.repository == 'ElementsProject/lightning'
|
||||
env:
|
||||
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_API_TOKEN }}
|
||||
WORKDIR: ${{ matrix.WORKDIR }}
|
||||
run: |
|
||||
echo "POETRY VERSION PUBLISH: $(poetry --version)"
|
||||
echo "Pyln* VERSION: $VERSION"
|
||||
cd ${{ env.WORKDIR }}
|
||||
export VERSION=$(git describe --abbrev=0)
|
||||
make upgrade-version NEW_VERSION=$VERSION
|
||||
python3 -m pip config set global.timeout 150
|
||||
poetry build --no-interaction
|
||||
poetry publish --no-interaction
|
||||
|
Loading…
Reference in New Issue
Block a user