Skip to content

Commit d92307d

Browse files
committed
clean up scripts
1 parent 5702f90 commit d92307d

File tree

5 files changed

+72
-199
lines changed

5 files changed

+72
-199
lines changed

.github/workflows/build.yml

Lines changed: 0 additions & 135 deletions
This file was deleted.

.github/workflows/opencv.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
workflow_dispatch:
88

99
env:
10-
OPENCV_VERSION: 4.10.0
10+
OPENCV_VERSION: 4.11.0
1111
OPENCV_CMAKE_ARGS: >-
1212
-D CMAKE_BUILD_TYPE=RELEASE
1313
-D OPENCV_EXTRA_MODULES_PATH=${{ github.workspace }}/opencv_contrib/modules

.github/workflows/opencvsharp.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
workflow_dispatch:
88

99
env:
10-
OPENCVSHARP_VERSION: 4.10.0.20241024
10+
OPENCVSHARP_VERSION: 4.11.0.20250507
1111

1212
jobs:
1313
build:
@@ -16,7 +16,7 @@ jobs:
1616

1717
strategy:
1818
matrix:
19-
os: [ubuntu-20.04, ubuntu-22.04, ubuntu-24.04]
19+
os: [ubuntu-22.04, ubuntu-24.04]
2020

2121
steps:
2222
- name: Checkout
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: Test-OpenCvSharp on CentOS 7
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
paths: [ '.github/workflows/test-opencvsharp-centos7.yml' ]
7+
workflow_dispatch:
8+
9+
jobs:
10+
centos7-test:
11+
name: Test OpenCvSharp on CentOS 7
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Download OpenCvSharp Artifacts
15+
env:
16+
GH_TOKEN: ${{ github.token }}
17+
run: |
18+
echo "Fetching latest run of opencvsharp.yml on branch ${{ github.ref_name }}"
19+
RUN_ID=$(gh run list -R ${{ github.repository }} --workflow=opencvsharp.yml --branch=${{ github.ref_name }} --status=success --limit=1 --json databaseId | jq -r '.[0].databaseId')
20+
echo "Latest opencvsharp run ID: $RUN_ID"
21+
echo "Downloading artifact 'opencvsharp-linux-x64-ubuntu-20.04' from run ${RUN_ID}"
22+
gh run download -R ${{ github.repository }} $RUN_ID --name opencvsharp-linux-x64-ubuntu-20.04 --dir opencvsharp
23+
ls -lR opencvsharp
24+
25+
- name: Pull centos:7 Docker image
26+
run: docker pull centos:7
27+
28+
- name: Start CentOS 7 container
29+
run: docker run -d --name centos7_test -v "$PWD":/work -w /work centos:7 tail -f /dev/null
30+
31+
- name: Reconfigure YUM cache
32+
run: |
33+
docker exec centos7_test bash -c "set -eux; \
34+
sed -i 's|^mirrorlist=|#mirrorlist=|g' /etc/yum.repos.d/CentOS-*.repo && \
35+
sed -i 's|^#baseurl=|baseurl=|g' /etc/yum.repos.d/CentOS-*.repo && \
36+
sed -i 's|mirror.centos.org|vault.centos.org|g' /etc/yum.repos.d/CentOS-*.repo && \
37+
yum clean all && \
38+
yum makecache"
39+
40+
- name: Install gcc dependency
41+
run: docker exec centos7_test bash -c "set -eux; yum install -y gcc"
42+
43+
- name: Prepare test code
44+
run: |
45+
mkdir -p test
46+
echo '#include <stdio.h>
47+
int core_Mat_sizeof();
48+
int main()
49+
{
50+
int i = core_Mat_sizeof();
51+
printf("sizeof(Mat) = %d\\n", i);
52+
return 0;
53+
}' > test/test.c
54+
55+
- name: Compile test code
56+
run: docker exec centos7_test bash -c "set -eux; gcc test/test.c -L./opencvsharp/lib -lOpenCvSharpExtern -o test/test"
57+
58+
- name: Run test
59+
run: docker exec centos7_test bash -c "set -eux; LD_LIBRARY_PATH=/work/opencvsharp/lib:\$LD_LIBRARY_PATH ./test/test"
60+
61+
- name: Cleanup container
62+
run: docker stop centos7_test && docker rm centos7_test
63+
64+
- name: Upload Artifacts
65+
uses: actions/upload-artifact@v4
66+
with:
67+
name: test-linux-x64-centos7
68+
path: test

.github/workflows/test-opencvsharp.yml

Lines changed: 1 addition & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313

1414
strategy:
1515
matrix:
16-
os: [ubuntu-20.04, ubuntu-22.04, ubuntu-24.04]
16+
os: [ubuntu-22.04, ubuntu-24.04]
1717

1818
steps:
1919
- name: Download OpenCvSharp Artifacts
@@ -54,63 +54,3 @@ jobs:
5454
with:
5555
name: test-linux-x64-${{ matrix.os }}
5656
path: test
57-
58-
centos7-test:
59-
name: Test OpenCvSharp on CentOS 7
60-
runs-on: ubuntu-latest
61-
steps:
62-
- name: Download OpenCvSharp Artifacts
63-
env:
64-
GH_TOKEN: ${{ github.token }}
65-
run: |
66-
echo "Fetching latest run of opencvsharp.yml on branch ${{ github.ref_name }}"
67-
RUN_ID=$(gh run list -R ${{ github.repository }} --workflow=opencvsharp.yml --branch=${{ github.ref_name }} --status=success --limit=1 --json databaseId | jq -r '.[0].databaseId')
68-
echo "Latest opencvsharp run ID: $RUN_ID"
69-
echo "Downloading artifact 'opencvsharp-linux-x64-ubuntu-20.04' from run ${RUN_ID}"
70-
gh run download -R ${{ github.repository }} $RUN_ID --name opencvsharp-linux-x64-ubuntu-20.04 --dir opencvsharp
71-
ls -lR opencvsharp
72-
73-
- name: Pull centos:7 Docker image
74-
run: docker pull centos:7
75-
76-
- name: Start CentOS 7 container
77-
run: docker run -d --name centos7_test -v "$PWD":/work -w /work centos:7 tail -f /dev/null
78-
79-
- name: Reconfigure YUM cache
80-
run: |
81-
docker exec centos7_test bash -c "set -eux; \
82-
sed -i 's|^mirrorlist=|#mirrorlist=|g' /etc/yum.repos.d/CentOS-*.repo && \
83-
sed -i 's|^#baseurl=|baseurl=|g' /etc/yum.repos.d/CentOS-*.repo && \
84-
sed -i 's|mirror.centos.org|vault.centos.org|g' /etc/yum.repos.d/CentOS-*.repo && \
85-
yum clean all && \
86-
yum makecache"
87-
88-
- name: Install gcc dependency
89-
run: docker exec centos7_test bash -c "set -eux; yum install -y gcc"
90-
91-
- name: Prepare test code
92-
run: |
93-
mkdir -p test
94-
echo '#include <stdio.h>
95-
int core_Mat_sizeof();
96-
int main()
97-
{
98-
int i = core_Mat_sizeof();
99-
printf("sizeof(Mat) = %d\\n", i);
100-
return 0;
101-
}' > test/test.c
102-
103-
- name: Compile test code
104-
run: docker exec centos7_test bash -c "set -eux; gcc test/test.c -L./opencvsharp/lib -lOpenCvSharpExtern -o test/test"
105-
106-
- name: Run test
107-
run: docker exec centos7_test bash -c "set -eux; LD_LIBRARY_PATH=/work/opencvsharp/lib:\$LD_LIBRARY_PATH ./test/test"
108-
109-
- name: Cleanup container
110-
run: docker stop centos7_test && docker rm centos7_test
111-
112-
- name: Upload Artifacts
113-
uses: actions/upload-artifact@v4
114-
with:
115-
name: test-linux-x64-centos7
116-
path: test

0 commit comments

Comments
 (0)