From 8e867d6bc285403857f07ad1bf5e3755c4b176c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A1szl=C3=B3=20Vask=C3=B3?= <1771332+vlaci@users.noreply.github.com> Date: Thu, 14 Dec 2023 20:47:04 +0100 Subject: [PATCH] DEBUG --- .github/workflows/ci.yml | 191 ++++----------------------------------- 1 file changed, 16 insertions(+), 175 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fa6314b..096cc5a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,50 +13,22 @@ concurrency: cancel-in-progress: true jobs: - checks: - name: Checks - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: cachix/install-nix-action@v22 - - uses: cachix/cachix-action@v12 - with: - name: pyperscan - authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}" - - name: Nix Flake checks - run: | - nix flake check \ - --keep-going \ - --print-build-logs - - name: Code coverage - run: | - nix build .#checks.x86_64-linux.coverage -o pytest.codecov - - uses: codecov/codecov-action@v3 - with: - flags: cargo-test - files: cargo-test.codecov - - uses: codecov/codecov-action@v3 - with: - flags: pytest - files: pytest.codecov build: - needs: - - checks strategy: matrix: include: - - os: ubuntu-latest - arch: x86_64-linux - drv: "shared" - - os: ubuntu-latest - arch: x86_64-linux - drv: "hyperscan" - - os: ubuntu-latest - arch: x86_64-linux - drv: "vectorscan" - - os: ubuntu-latest - arch: aarch64-linux - drv: "vectorscan" + # - os: ubuntu-latest + # arch: x86_64-linux + # drv: "shared" + # - os: ubuntu-latest + # arch: x86_64-linux + # drv: "hyperscan" + # - os: ubuntu-latest + # arch: x86_64-linux + # drv: "vectorscan" + # - os: ubuntu-latest + # arch: aarch64-linux + # drv: "vectorscan" - os: macos-11 arch: x86_64-darwin drv: vectorscan @@ -78,144 +50,13 @@ jobs: sudo apt install -q -y qemu-system-aarch64 qemu-efi binfmt-support qemu-user-static mkdir -p ~/.config/nix echo "system-features = aarch64-linux arm-linux" | sudo tee -a /etc/nix/nix.conf + - name: Setup tmate session + uses: mxschmitt/action-tmate@v3 + with: + limit-access-to-actor: true - name: Build nix shell run: | nix build -L .#devShells.${{ matrix.arch }}.default --option system ${{ matrix.arch }} --extra-platforms ${{ matrix.arch }} - name: Build nix package run: nix build -L .?submodules=1#packages.${{ matrix.arch }}.default.${{ matrix.drv }} --option system ${{ matrix.arch }} --extra-platforms ${{ matrix.arch }} - sdist: - name: Build - sdist - needs: - - checks - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: PyO3/maturin-action@v1 - with: - container: off - command: sdist - args: -o dist - - name: Upload sdist - uses: actions/upload-artifact@v3 - with: - name: sdist - path: dist - - linux-wheels: - strategy: - matrix: - include: - - target: x86_64-unknown-linux-gnu - arch: amd64 - - target: x86_64-unknown-linux-musl - arch: amd64 - - target: aarch64-unknown-linux-gnu - arch: arm64 - - target: aarch64-unknown-linux-musl - arch: arm64 - name: Build wheel - ${{ matrix.target }} - needs: - - checks - runs-on: ubuntu-latest - env: - image: ghcr.io/vlaci/pyperscan-builder-${{ matrix.target }} - permissions: - packages: write - steps: - - uses: actions/checkout@v3 - with: - submodules: true - - name: Cache rust - uses: Swatinem/rust-cache@v2 - with: - key: wheel-linux-${{ matrix.target }}-${{ matrix.tag }} - - name: Install dependencies - uses: extractions/setup-crate@v1 - with: - owner: casey - name: just - version: 1.9.0 - - name: Log in to the GitHub Container registry - uses: redhat-actions/podman-login@v1 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - name: Check cached build image - run: | - TAG=${{hashFiles(format('Containerfile.{0}', matrix.target)) }} - echo tag=$TAG >> $GITHUB_ENV - - run: just wheel ${{ matrix.target }} - - run: podman push $image:$tag - - run: podman push $image:latest - if: github.ref_name == 'main' - - name: Upload wheels - uses: actions/upload-artifact@v3 - with: - name: wheels-${{ matrix.target }} - path: dist - - macos-wheel: - needs: - - checks - name: Build wheel - ${{ matrix.target }}-apple-darwin - runs-on: macos-latest - env: - MACOSX_DEPLOYMENT_TARGET: "10.9" - strategy: - matrix: - target: [x86_64, aarch64] - steps: - - uses: actions/checkout@v3 - with: - submodules: true - - name: Cache rust - uses: Swatinem/rust-cache@v2 - with: - key: wheel-macos-${{ matrix.target }} - - name: Install dependencies - run: | - brew install boost ragel - echo container= > $GITHUB_ENV - - name: Disable tools - run: | - rm hyperscan-sys/*/tools/CMakeLists.txt - - uses: PyO3/maturin-action@v1 - with: - target: ${{ matrix.target }} - args: --release --out dist -F vectorscan - sccache: "true" - - name: Upload wheels - uses: actions/upload-artifact@v3 - with: - name: wheels-${{ matrix.target }}-darwin - path: dist - - uses: pdm-project/setup-pdm@v3 - - name: Test wheels - if: ${{ matrix.target == 'x86_64' }} - run: | - pdm sync -d --no-self -G test - pdm run python -m ensurepip - pdm run python -m pip install dist/*.whl - pdm pytest - - release: - name: Release - runs-on: ubuntu-latest - if: "startsWith(github.ref, 'refs/tags/')" - needs: - - sdist - - linux-wheels - - macos-wheel - steps: - - uses: actions/download-artifact@v3 - with: - path: dist - - name: Publish to PyPI - uses: messense/maturin-action@v1 - env: - MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }} - with: - command: upload - args: --skip-existing dist/*/*