|
1 | | -name: Linux ARM (Docker) |
| 1 | +name: Linux ARM |
2 | 2 |
|
3 | 3 | on: |
4 | 4 | pull_request: |
|
9 | 9 |
|
10 | 10 | env: |
11 | 11 | DEBIAN_FRONTEND: noninteractive |
12 | | - OPENCV_VERSION: 4.12.0 |
| 12 | + OPENCV_VERSION: 4.13.0 |
| 13 | + DOCKER_BUILD_CONTEXT: ./docker/ubuntu24-dotnet10-opencv4.13.0 |
13 | 14 |
|
14 | 15 | jobs: |
15 | 16 | build: |
16 | | - runs-on: ubuntu-latest |
| 17 | + runs-on: ubuntu-24.04-arm |
17 | 18 | steps: |
18 | | - - uses: actions/checkout@v4 |
19 | | - |
20 | | - - uses: docker/setup-qemu-action@v3 |
| 19 | + - uses: actions/checkout@v6 |
21 | 20 |
|
22 | 21 | - uses: docker/setup-buildx-action@v3 |
23 | | - with: |
24 | | - install: true |
25 | 22 |
|
26 | 23 | # Build with Buildx and cache Docker layers in GitHub Actions cache |
27 | | - - name: Build with Docker (cached) |
| 24 | + - name: Build with Docker (native ARM64) |
28 | 25 | uses: docker/build-push-action@v6 |
29 | 26 | with: |
30 | | - context: ./docker/ubuntu24-dotnet8-opencv4.12.0 |
31 | | - platforms: linux/arm64 |
| 27 | + context: ${{ env.DOCKER_BUILD_CONTEXT }} |
32 | 28 | build-args: | |
33 | 29 | OPENCV_VERSION=${{ env.OPENCV_VERSION }} |
34 | | - # Load the built image to local Docker for later docker create/cp |
| 30 | + OPENCVSHARP_REF=${{ github.head_ref || github.ref_name }} |
35 | 31 | outputs: type=docker,name=opencvsharp-linux-arm:latest |
36 | | - cache-from: type=gha |
37 | | - cache-to: type=gha,mode=max |
| 32 | + # Use branch-specific cache keys to avoid using stale code from other branches |
| 33 | + cache-from: | |
| 34 | + type=gha,scope=${{ github.ref_name }} |
| 35 | + type=gha,scope=main |
| 36 | + # Save cache with branch-specific scope |
| 37 | + cache-to: type=gha,mode=max,scope=${{ github.ref_name }} |
38 | 38 |
|
39 | 39 | - name: Extract build files from Docker instance |
40 | 40 | run: | |
41 | | - docker create -ti --name opencvsharp-linux-arm-tmp opencvsharp-linux-arm bash |
| 41 | + docker create -ti --name opencvsharp-linux-arm-tmp opencvsharp-linux-arm:latest bash |
42 | 42 | docker cp opencvsharp-linux-arm-tmp:/artifacts . |
43 | 43 |
|
44 | 44 | - name: Patch nuspec with version and build NuGet package |
|
0 commit comments