From 7be3ce14961b918eff0ec47b829d3fc9979715b0 Mon Sep 17 00:00:00 2001 From: Mix <32300164+mnixry@users.noreply.github.com> Date: Fri, 3 Jan 2025 13:22:06 +0800 Subject: [PATCH] :construction_worker: Enhance CI workflow with manylinux container --- .github/workflows/ci.yml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 42142de..8bce1fc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,10 +14,14 @@ jobs: strategy: matrix: os: - - ubuntu-latest - windows-latest - macos-13 - macos-latest + include: + - os: ubuntu-latest + container: quay.io/pypa/manylinux_2_34_x86_64 + - os: ubuntu-latest + container: quay.io/pypa/musllinux_1_2_x86_64 defaults: run: @@ -27,15 +31,15 @@ jobs: SCCACHE_GHA_ENABLED: true runs-on: ${{ matrix.os }} + container: ${{ matrix.container }} steps: - name: Get latest release id: latest-release run: | - curl -s https://api.github.com/repos/opencv/opencv/releases/latest \ - -H "Accept: application/vnd.github.v3+json" \ - -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ - | jq -r '.tag_name' | tee latest-release.txt + curl -Ls -o /dev/null -w %{url_effective} \ + https://github.com/opencv/opencv/releases/latest \ + | sed 's#.*tag/\(.*\)$#\1#' > latest-release.txt echo "tag=$(cat latest-release.txt)" >> $GITHUB_OUTPUT - uses: actions/checkout@main @@ -113,6 +117,8 @@ jobs: runs-on: ${{ matrix.os }} + container: ${{ startsWith(matrix.os, 'ubuntu') && 'quay.io/pypa/manylinux_2_34_x86_64' || '' }} + steps: - uses: actions/checkout@main @@ -196,7 +202,7 @@ jobs: - name: Install dependencies run: | pdm install -G test --no-self - pdm add dist/*.whl --no-lock + pdm add -v dist/*.whl --frozen-lockfile - name: Run tests run: |