use matrix for build

This commit is contained in:
Thephaseless 2024-12-11 00:40:11 +00:00
parent 986f7446bf
commit c5f442a4af
4 changed files with 11 additions and 14 deletions

View File

@ -24,7 +24,15 @@ env:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- os: ubuntu-latest
arch: amd64
- os: ubuntu-latest-arm
arch: arm64
runs-on: ${{ matrix.os }}
permissions:
contents: read
packages: write
@ -78,7 +86,7 @@ jobs:
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64,linux/arm64
platforms: linux/${{ matrix.arch }}
cache-from: type=gha
cache-to: type=gha,mode=max
target: test
@ -93,7 +101,7 @@ jobs:
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64
platforms: linux/${{ matrix.arch }}
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: GITHUB_BUILD=true,VERSION=${{ github.ref_name }}

View File

@ -23,9 +23,6 @@ RUN curl -LsSf https://astral.sh/uv/install.sh | sh
COPY pyproject.toml uv.lock ./
RUN uv sync
COPY github_actions_fix.sh ./
RUN ./github_actions_fix.sh
COPY . .
RUN cd .venv/lib/*/site-packages/seleniumbase/drivers && ln -s /usr/bin/chromedriver uc_driver

4
cmd.sh
View File

@ -1,7 +1,3 @@
#!/bin/sh
if [ -f ld_fix.sh ]; then
. ./ld_fix.sh
fi
uv run main.py

View File

@ -1,7 +1,3 @@
#!/bin/sh
if [ -f ./ld_fix.sh ]; then
. ./ld_fix.sh
fi
uv run pytest --retries 2 -n auto --xvfb