Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

github: Update FreeBSD Test #7599

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 15 additions & 12 deletions .github/workflows/bsd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -20,9 +24,9 @@ jobs:
usesh: true
prepare: |
pkg install -y \
bash \
wget \
py38-pip \
py38-sqlite3 \
python38 \
gmake \
git \
python \
Expand All @@ -36,16 +40,16 @@ 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-${{ 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 }}

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

run: |
PATH=/root/.local/bin:$PATH
pip install --user -U wheel pip
Expand Down Expand Up @@ -84,4 +88,3 @@ jobs:

# Clean up to maximize rsync's chances of succeeding
gmake clean

158 changes: 79 additions & 79 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
@@ -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: Check version tag
run: >-
git describe --always --dirty=-modded --abbrev=7

- 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: 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

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: Check version tag
run: >-
git describe --always --dirty=-modded --abbrev=7

- 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: 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