Skip to content

Commit 7f472a4

Browse files
committed
Add python 2 to Ubuntu build matrix.
1 parent 6a9c341 commit 7f472a4

File tree

1 file changed

+31
-1
lines changed

1 file changed

+31
-1
lines changed

.github/workflows/test-ubuntu.yml

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
strategy:
1414
fail-fast: false
1515
matrix:
16-
python-version: ['3.14']
16+
python-version: ['2.7', '3.14']
1717
cxx: [g++, clang++]
1818
std: [c++11, c++14, c++17]
1919
include:
@@ -34,16 +34,46 @@ jobs:
3434
steps:
3535
- uses: actions/checkout@v5
3636
- name: setup python
37+
if: "${{ matrix.python-version != '2.7' }}"
3738
uses: actions/setup-python@v5
3839
with:
3940
python-version: ${{ matrix.python-version }}
4041
- name: setup prerequisites
4142
run: |
43+
# Warning: this is not necessarily the same Python version as the one configured above !
44+
python3 -m pip install -U faber --break-system-packages
4245
echo "CXX=${{ matrix.cxx }}" >> "$GITHUB_ENV"
4346
echo "CXX_STD=${{ matrix.std }}" >> "$GITHUB_ENV"
4447
- name: build
48+
if: "${{ matrix.python-version != '2.7' }}"
4549
run: |
4650
.github/run-faber.sh
51+
- name: build
52+
if: "${{ matrix.python-version == '2.7' }}"
53+
run: |
54+
python --version
55+
${{ matrix.cxx }} --version
56+
faber -v
57+
sed -e "s/\$PYTHON/python/g" .ci/faber > ~/.faber
58+
faber \
59+
--with-boost-include=${BOOST_PY_DEPS} \
60+
--builddir=build \
61+
cxx.name=${{ matrix.cxx }} \
62+
cxxflags=-std=${{ matrix.std }} \
63+
cppflags=-std=${{ matrix.std }} \
64+
-j`nproc`
4765
- name: test
66+
if: "${{ matrix.python-version != '2.7' }}"
4867
run: |
4968
.github/run-faber.sh test.report
69+
- name: test
70+
if: "${{ matrix.python-version == '2.7' }}"
71+
run: |
72+
faber \
73+
--with-boost-include=${BOOST_PY_DEPS} \
74+
--builddir=build \
75+
cxx.name=${{ matrix.cxx }} \
76+
cxxflags=-std=${{ matrix.std }} \
77+
cppflags=-std=${{ matrix.std }} \
78+
-j`nproc` \
79+
test.report

0 commit comments

Comments
 (0)