Skip to content

Commit 382b496

Browse files
ShahanaFarooquirustyrussell
authored andcommitted
github: Update FreeBSD Test
- Passing bitcoind version from matrix - cleanup: Removed extra tabs and `-` from pypi.yml Changelog-Fixed: Github action for FreeBSD setup
1 parent 3a4dd5f commit 382b496

File tree

2 files changed

+94
-91
lines changed

2 files changed

+94
-91
lines changed

.github/workflows/bsd.yml

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ jobs:
1111
runs-on: ubuntu-latest
1212
name: Build and test on FreeBSD
1313
timeout-minutes: 120
14+
strategy:
15+
fail-fast: true
16+
matrix:
17+
bitcoind-version: ["27.1"]
1418
steps:
1519
- uses: actions/checkout@v4
1620
- name: Test in FreeBSD
@@ -20,9 +24,9 @@ jobs:
2024
usesh: true
2125
prepare: |
2226
pkg install -y \
27+
bash \
2328
wget \
24-
py38-pip \
25-
py38-sqlite3 \
29+
python38 \
2630
gmake \
2731
git \
2832
python \
@@ -36,16 +40,16 @@ jobs:
3640
lowdown \
3741
curl
3842
39-
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain nightly-2021-08-3z1
43+
python3.8 -m ensurepip
44+
python3.8 -m pip install --upgrade pip
45+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain nightly-2021-08-3z1
46+
47+
cd /tmp/ || exit 1
48+
wget https://bitcoincore.org/bin/bitcoin-core-${{ matrix.bitcoind-version }}/bitcoin-${{ matrix.bitcoind-version }}-x86_64-linux-gnu.tar.gz
49+
tar -xf bitcoin-${{ matrix.bitcoind-version }}-x86_64-linux-gnu.tar.bz2
50+
sudo mv bitcoin-${{ matrix.bitcoind-version }}/bin/* /usr/local/bin
51+
rm -rf bitcoin-${{ matrix.bitcoind-version }}-x86_64-linux-gnu.tar.gz bitcoin-${{ matrix.bitcoind-version }}
4052
41-
cd /tmp/ || exit 1
42-
wget https://bitcoincore.org/bin/bitcoin-core-27.1/bitcoin-27.1-x86_64-linux-gnu.tar.gz
43-
tar -xf bitcoin-27.1-x86_64-linux-gnu.tar.bz2
44-
sudo mv bitcoin-27.1/bin/* /usr/local/bin
45-
rm -rf \
46-
bitcoin-27.1-x86_64-linux-gnu.tar.gz \
47-
bitcoin-27.1
48-
4953
run: |
5054
PATH=/root/.local/bin:$PATH
5155
pip install --user -U wheel pip
@@ -84,4 +88,3 @@ jobs:
8488
8589
# Clean up to maximize rsync's chances of succeeding
8690
gmake clean
87-

.github/workflows/pypi.yml

Lines changed: 79 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -1,79 +1,79 @@
1-
---
2-
name: Publish Python 🐍 distributions 📦 to PyPI and TestPyPI
3-
on:
4-
push:
5-
tags:
6-
'^v[0-9]{2}\.[0-9]{2}(\.[0-9]{1,2})?$'
7-
workflow_dispatch:
8-
jobs:
9-
deploy:
10-
name: Build and publish ${{ matrix.package }} 🐍
11-
runs-on: ubuntu-20.04
12-
timeout-minutes: 120
13-
strategy:
14-
fail-fast: true
15-
matrix:
16-
include:
17-
- PACKAGE: pyln-client
18-
WORKDIR: contrib/pyln-client
19-
- PACKAGE: pyln-testing
20-
WORKDIR: contrib/pyln-testing
21-
- PACKAGE: pyln-proto
22-
WORKDIR: contrib/pyln-proto
23-
- PACKAGE: pyln-grpc-proto
24-
WORKDIR: contrib/pyln-grpc-proto
25-
steps:
26-
- name: Checkout repository
27-
uses: actions/checkout@v4
28-
with:
29-
# Need to fetch entire history in order to locate the version tag
30-
fetch-depth: 0
31-
32-
- name: Check version tag
33-
run: >-
34-
git describe --always --dirty=-modded --abbrev=7
35-
36-
- name: Setup Version
37-
env:
38-
WORKDIR: ${{ matrix.WORKDIR }}
39-
run: |
40-
echo "VERSION=$(git describe --abbrev=0).post$(git describe --abbrev=1 | awk -F "-" '{print $2}')" >> $GITHUB_ENV
41-
42-
- name: Install Poetry
43-
env:
44-
WORKDIR: ${{ matrix.WORKDIR }}
45-
run: |
46-
curl -sSL https://install.python-poetry.org | python3 -
47-
echo "$HOME/.local/bin" >> $GITHUB_PATH
48-
echo "PATH=$HOME/.local/bin:$PATH"
49-
50-
- name: Publish distribution 📦 to Test PyPI
51-
if: github.event_name == 'workflow_dispatch' && github.repository == 'ElementsProject/lightning'
52-
env:
53-
POETRY_PYPI_TOKEN_TESTPYPI: ${{ secrets.TEST_PYPI_API_TOKEN }}
54-
WORKDIR: ${{ matrix.WORKDIR }}
55-
run: |
56-
echo "POETRY VERSION TEST: $(poetry --version)"
57-
echo "Pyln* VERSION: $VERSION"
58-
cd ${{ env.WORKDIR }}
59-
python3 -m pip config set global.timeout 150
60-
poetry config repositories.testpypi https://test.pypi.org/legacy/
61-
make upgrade-version NEW_VERSION=$VERSION
62-
poetry build --no-interaction
63-
poetry publish --repository testpypi --no-interaction --skip-existing
64-
65-
- name: Publish distribution 📦 to PyPI
66-
if: startsWith(github.ref, 'refs/tags/v') && github.repository == 'ElementsProject/lightning'
67-
env:
68-
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_API_TOKEN }}
69-
WORKDIR: ${{ matrix.WORKDIR }}
70-
run: |
71-
echo "POETRY VERSION PUBLISH: $(poetry --version)"
72-
echo "Pyln* VERSION: $VERSION"
73-
cd ${{ env.WORKDIR }}
74-
export VERSION=$(git describe --abbrev=0)
75-
make upgrade-version NEW_VERSION=$VERSION
76-
python3 -m pip config set global.timeout 150
77-
poetry build --no-interaction
78-
poetry publish --no-interaction
79-
1+
name: Publish Python 🐍 distributions 📦 to PyPI and TestPyPI
2+
3+
on:
4+
push:
5+
tags:
6+
'^v[0-9]{2}\.[0-9]{2}(\.[0-9]{1,2})?$'
7+
workflow_dispatch:
8+
9+
jobs:
10+
deploy:
11+
name: Build and publish ${{ matrix.package }} 🐍
12+
runs-on: ubuntu-20.04
13+
timeout-minutes: 120
14+
strategy:
15+
fail-fast: true
16+
matrix:
17+
include:
18+
- PACKAGE: pyln-client
19+
WORKDIR: contrib/pyln-client
20+
- PACKAGE: pyln-testing
21+
WORKDIR: contrib/pyln-testing
22+
- PACKAGE: pyln-proto
23+
WORKDIR: contrib/pyln-proto
24+
- PACKAGE: pyln-grpc-proto
25+
WORKDIR: contrib/pyln-grpc-proto
26+
steps:
27+
- name: Checkout repository
28+
uses: actions/checkout@v4
29+
with:
30+
# Need to fetch entire history in order to locate the version tag
31+
fetch-depth: 0
32+
33+
- name: Check version tag
34+
run: >-
35+
git describe --always --dirty=-modded --abbrev=7
36+
37+
- name: Setup Version
38+
env:
39+
WORKDIR: ${{ matrix.WORKDIR }}
40+
run: |
41+
echo "VERSION=$(git describe --abbrev=0).post$(git describe --abbrev=1 | awk -F "-" '{print $2}')" >> $GITHUB_ENV
42+
43+
- name: Install Poetry
44+
env:
45+
WORKDIR: ${{ matrix.WORKDIR }}
46+
run: |
47+
curl -sSL https://install.python-poetry.org | python3 -
48+
echo "$HOME/.local/bin" >> $GITHUB_PATH
49+
echo "PATH=$HOME/.local/bin:$PATH"
50+
51+
- name: Publish distribution 📦 to Test PyPI
52+
if: github.event_name == 'workflow_dispatch' && github.repository == 'ElementsProject/lightning'
53+
env:
54+
POETRY_PYPI_TOKEN_TESTPYPI: ${{ secrets.TEST_PYPI_API_TOKEN }}
55+
WORKDIR: ${{ matrix.WORKDIR }}
56+
run: |
57+
echo "POETRY VERSION TEST: $(poetry --version)"
58+
echo "Pyln* VERSION: $VERSION"
59+
cd ${{ env.WORKDIR }}
60+
python3 -m pip config set global.timeout 150
61+
poetry config repositories.testpypi https://test.pypi.org/legacy/
62+
make upgrade-version NEW_VERSION=$VERSION
63+
poetry build --no-interaction
64+
poetry publish --repository testpypi --no-interaction --skip-existing
65+
66+
- name: Publish distribution 📦 to PyPI
67+
if: startsWith(github.ref, 'refs/tags/v') && github.repository == 'ElementsProject/lightning'
68+
env:
69+
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_API_TOKEN }}
70+
WORKDIR: ${{ matrix.WORKDIR }}
71+
run: |
72+
echo "POETRY VERSION PUBLISH: $(poetry --version)"
73+
echo "Pyln* VERSION: $VERSION"
74+
cd ${{ env.WORKDIR }}
75+
export VERSION=$(git describe --abbrev=0)
76+
make upgrade-version NEW_VERSION=$VERSION
77+
python3 -m pip config set global.timeout 150
78+
poetry build --no-interaction
79+
poetry publish --no-interaction

0 commit comments

Comments
 (0)