Skip to content

Commit d66229b

Browse files
authored
Update c-cpp.yml
1 parent 797dad0 commit d66229b

1 file changed

Lines changed: 15 additions & 10 deletions

File tree

.github/workflows/c-cpp.yml

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build and Release
1+
name: Build (Docker Manual Qt)
22

33
on:
44
push:
@@ -7,25 +7,30 @@ jobs:
77
build:
88
runs-on: ubuntu-latest
99

10-
container:
11-
image: stateoftheartio/qt6
12-
1310
steps:
1411
- name: Checkout code
1512
uses: actions/checkout@v4
1613

17-
- name: Build with qmake and make
14+
- name: Build in Docker (manual Qt install)
1815
run: |
19-
qmake
20-
make
16+
docker run --rm -v $PWD:/workspace -w /workspace ubuntu:22.04 bash -c "
17+
apt-get update &&
18+
DEBIAN_FRONTEND=noninteractive apt-get install -y build-essential wget git qtbase5-dev qt6-base-dev qt6-base-dev-tools qt6-tools-dev qt6-tools-dev-tools &&
19+
if [ -f *.pro ]; then
20+
qmake *.pro
21+
elif [ -f CMakeLists.txt ]; then
22+
cmake -B build && cmake --build build
23+
fi &&
24+
make || cmake --build build
25+
"
2126
2227
- name: Archive build
2328
run: |
2429
mkdir -p dist
25-
cp <your_binary> dist/
26-
cp README.md dist/
30+
cp <your_binary> dist/ || true
31+
cp README.md dist/ || true
2732
cd dist
28-
tar -czvf ../MasterStringz.tar.gz *
33+
tar -czvf ../MasterStringz.tar.gz * || true
2934
3035
- name: Create Release
3136
uses: softprops/action-gh-release@v2

0 commit comments

Comments
 (0)