Skip to content
This repository was archived by the owner on Oct 8, 2025. It is now read-only.

Commit 0a1d3fb

Browse files
committed
docker script changes and github ci
1 parent 1abcb30 commit 0a1d3fb

File tree

4 files changed

+128
-4
lines changed

4 files changed

+128
-4
lines changed

.github/workflows/build.yml

Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
name: Build
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- "*"
8+
- "*/*"
9+
- "**"
10+
pull_request:
11+
branches:
12+
- "master"
13+
14+
jobs:
15+
build-windows-x64-release:
16+
runs-on: windows-2019
17+
steps:
18+
- uses: actions/checkout@v4
19+
with:
20+
clean: true
21+
submodules: recursive
22+
fetch-depth: 0
23+
24+
- name: Generate build files
25+
run: |
26+
mkdir build
27+
cd build
28+
cmake -DCMAKE_BUILD_TYPE=Release .. -G "Visual Studio 16 2019"
29+
cmake --build . --config Release
30+
31+
- name: Create a folder for release
32+
shell: bash
33+
run: |
34+
mkdir dist
35+
mv ./build/Release/$CAPI.dll ./dist/$CAPI.dll
36+
37+
- name: Upload artifacts
38+
uses: actions/upload-artifact@v4
39+
with:
40+
name: omp-capi-win-x64
41+
path: dist/*
42+
43+
build-windows-x86-release:
44+
runs-on: windows-2019
45+
steps:
46+
- uses: actions/checkout@v4
47+
with:
48+
clean: true
49+
submodules: recursive
50+
fetch-depth: 0
51+
52+
- name: Generate build files
53+
run: |
54+
mkdir build
55+
cd build
56+
cmake -DCMAKE_BUILD_TYPE=Release .. -A Win32 -G "Visual Studio 16 2019"
57+
cmake --build . --config Release
58+
59+
- name: Create a folder for release
60+
shell: bash
61+
run: |
62+
mkdir dist
63+
mv ./build/Release/$CAPI.dll ./dist/$CAPI.dll
64+
65+
- name: Upload artifacts
66+
uses: actions/upload-artifact@v4
67+
with:
68+
name: omp-capi-win32
69+
path: dist/*
70+
71+
build-linux-x64-release:
72+
runs-on: ubuntu-latest
73+
steps:
74+
- uses: actions/checkout@v3
75+
with:
76+
clean: true
77+
submodules: recursive
78+
fetch-depth: 0
79+
80+
- name: Build using docker
81+
run: |
82+
cd docker
83+
chmod +x ./build.sh
84+
chmod +x ./docker-entrypoint.sh
85+
TARGET_BUILD_ARCH=x64 ./build.sh
86+
87+
- name: Create a folder for release
88+
shell: bash
89+
run: |
90+
mkdir dist
91+
sudo mv ./docker/build/$CAPI.so ./dist/$CAPI.so
92+
93+
- name: Upload artifacts
94+
uses: actions/upload-artifact@v4
95+
with:
96+
name: omp-capi-linux-x64
97+
path: dist/*
98+
99+
build-linux-x86-release:
100+
runs-on: ubuntu-latest
101+
steps:
102+
- uses: actions/checkout@v3
103+
with:
104+
clean: true
105+
submodules: recursive
106+
fetch-depth: 0
107+
108+
- name: Build using docker
109+
run: |
110+
cd docker
111+
chmod +x ./build.sh
112+
chmod +x ./docker-entrypoint.sh
113+
TARGET_BUILD_ARCH=x86 ./build.sh
114+
115+
- name: Create a folder for release
116+
shell: bash
117+
run: |
118+
mkdir dist
119+
sudo mv ./docker/build/$CAPI.so ./dist/$CAPI.so
120+
121+
- name: Upload artifacts
122+
uses: actions/upload-artifact@v4
123+
with:
124+
name: omp-capi-linux-x86
125+
path: dist/*
File renamed without changes.

docker/build.sh

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,15 @@
1010
|| target_build_arch="$TARGET_BUILD_ARCH"
1111

1212
docker build \
13-
-t omp-capi/build:ubuntu-18.04 \
14-
build_ubuntu-18.04/ \
13+
-t omp-capi/build:ubuntu-18.04 ./ \
1514
|| exit 1
1615

1716
folders=('build')
1817
for folder in "${folders[@]}"; do
1918
if [[ ! -d "./${folder}" ]]; then
20-
mkdir ${folder} &&
21-
chown 1000:1000 ${folder} || exit 1
19+
mkdir ${folder}
2220
fi
21+
sudo chown -R 1000:1000 ${folder} || exit 1
2322
done
2423

2524
docker run \
File renamed without changes.

0 commit comments

Comments
 (0)