summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2023-10-08 21:57:02 -0700
committerSam James <sam@gentoo.org>2023-10-12 06:04:06 +0100
commit78c8fbe8a35cd2926f37f21235c5d8b587efae46 (patch)
tree90e60104e244ef71e643753b43b083ed0d0f2775 /.github
parenta12d24f99d03c3c4975d84d63083449cd8487ef9 (diff)
downloadgentoolkit-78c8fbe8a35cd2926f37f21235c5d8b587efae46.tar.gz
Migrate to PEP517 meson-python build
Bug: https://bugs.gentoo.org/909888 Signed-off-by: Zac Medico <zmedico@gentoo.org> Closes: https://github.com/gentoo/gentoolkit/pull/36 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/ci.yml17
1 files changed, 15 insertions, 2 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 36a636a..c78050d 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -25,6 +25,14 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
+ - name: Install dependencies
+ run: |
+ set -xe
+ python -VV
+ python -m site
+ python -m pip install --upgrade pip
+ # setuptools needed for 3.12+ because of https://github.com/mesonbuild/meson/issues/7702.
+ python -m pip install meson ninja setuptools
- name: Install portage
run: |
mkdir portage
@@ -38,8 +46,13 @@ jobs:
sudo wget "https://www.gentoo.org/dtd/metadata.dtd" -O /var/cache/distfiles/metadata.dtd
sudo wget "https://gitweb.gentoo.org/proj/portage.git/plain/cnf/repos.conf" -O /etc/portage/repos.conf
sudo ln -s /var/db/repos/gentoo/profiles/default/linux/amd64/17.1/systemd /etc/portage/make.profile
- - name: Run tests
+ - name: Test meson install --destdir /tmp/install-root
+ run: |
+ echo -e "[binaries]\npython = '$(command -v python)'" > /tmp/native.ini
+ meson setup --native-file /tmp/native.ini /tmp/build .
+ meson install -C /tmp/build --destdir /tmp/install-root
+ - name: Run tests for ${{ matrix.python-version }}
run: |
export PYTHONPATH="${PWD}/portage/lib"${PYTHONPATH:+:}${PYTHONPATH}
export PATH="${PWD}/portage/bin":${PATH}
- python setup.py test
+ meson test -C /tmp/build --verbose