Skip to content

Commit 71cb83b

Browse files
committed
Merge remote-tracking branch 'origin/release/1.x'
2 parents 1e8c8a1 + b8df6b8 commit 71cb83b

51 files changed

Lines changed: 1904 additions & 223 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build-deb-qt5-amd64.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
branch:
1010
description: 'Checkout branch'
1111
required: false
12-
default: 'dev'
12+
default: 'release/1.x'
1313
tag:
1414
description: 'Checkout tag'
1515
required: false
@@ -39,7 +39,7 @@ jobs:
3939

4040
steps:
4141
- name: Checkout repository
42-
uses: actions/checkout@v4
42+
uses: actions/checkout@v6
4343
with:
4444
ref: ${{ github.event.inputs.tag || github.event.inputs.branch || github.ref_name }}
4545

@@ -66,7 +66,7 @@ jobs:
6666
run: |
6767
FULL_VERSION=$(grep -oP 'VERSION\s+\K[0-9]+\.[0-9]+\.[0-9]+' src/CMakeLists.txt)
6868
69-
if [ "${GITHUB_REF_NAME}" = "dev" ] || [ "${{ github.event.inputs.branch }}" = "dev" ]; then
69+
if [ "${GITHUB_REF_NAME}" = "dev" ] || [ "${{ github.event.inputs.branch }}" = "dev" ] || [[ "${GITHUB_REF_NAME}" == release/* ]] || [[ "${{ github.event.inputs.branch }}" == release/* ]]; then
7070
MAJOR_MINOR=$(echo "$FULL_VERSION" | cut -d. -f1,2)
7171
APP_VERSION="${MAJOR_MINOR}~dev"
7272
else
@@ -238,7 +238,7 @@ jobs:
238238
run: dpkg-buildpackage -us -uc -tc -b
239239

240240
- name: Upload DEB package
241-
uses: actions/upload-artifact@v4
241+
uses: actions/upload-artifact@v7
242242
if: success()
243243
with:
244244
name: ${{ env.DEB_PACKAGE_NAME }}_${{ env.APP_VERSION }}-${{ env.DEB_REVISION }}_${{ env.DEB_ARCH }}

.github/workflows/build-deb-qt6-amd64.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
branch:
1010
description: 'Checkout branch'
1111
required: false
12-
default: 'dev'
12+
default: 'release/1.x'
1313
tag:
1414
description: 'Checkout tag'
1515
required: false
@@ -40,7 +40,7 @@ jobs:
4040

4141
steps:
4242
- name: Checkout repository
43-
uses: actions/checkout@v4
43+
uses: actions/checkout@v6
4444
with:
4545
ref: ${{ github.event.inputs.tag || github.event.inputs.branch || github.ref_name }}
4646

@@ -67,7 +67,7 @@ jobs:
6767
run: |
6868
FULL_VERSION=$(grep -oP 'VERSION\s+\K[0-9]+\.[0-9]+\.[0-9]+' src/CMakeLists.txt)
6969
70-
if [ "${GITHUB_REF_NAME}" = "dev" ] || [ "${{ github.event.inputs.branch }}" = "dev" ]; then
70+
if [ "${GITHUB_REF_NAME}" = "dev" ] || [ "${{ github.event.inputs.branch }}" = "dev" ] || [[ "${GITHUB_REF_NAME}" == release/* ]] || [[ "${{ github.event.inputs.branch }}" == release/* ]]; then
7171
MAJOR_MINOR=$(echo "$FULL_VERSION" | cut -d. -f1,2)
7272
APP_VERSION="${MAJOR_MINOR}~dev"
7373
else
@@ -264,7 +264,7 @@ jobs:
264264
run: dpkg-buildpackage -us -uc -tc -b
265265

266266
- name: Upload DEB package
267-
uses: actions/upload-artifact@v4
267+
uses: actions/upload-artifact@v7
268268
if: success()
269269
with:
270270
name: ${{ env.DEB_PACKAGE_NAME }}_${{ env.APP_VERSION }}-${{ env.DEB_REVISION }}_${{ env.DEB_ARCH }}
Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
1+
name: Build macOS DMG (Qt6, Universal)
2+
3+
on:
4+
push:
5+
tags:
6+
- "*"
7+
workflow_dispatch:
8+
inputs:
9+
branch:
10+
description: 'Checkout branch'
11+
required: false
12+
default: 'dev'
13+
tag:
14+
description: 'Checkout tag'
15+
required: false
16+
17+
permissions:
18+
contents: write
19+
20+
jobs:
21+
build-omodsim:
22+
name: Build OpenModSim macOS DMG version '${{ github.event.inputs.tag || github.event.inputs.branch || github.ref_name }}' with Qt6
23+
runs-on: macos-latest
24+
25+
env:
26+
QT_VERSION: "6.9.3"
27+
QT_HOST: "mac"
28+
QT_TARGET: "desktop"
29+
QT_ARCH: "clang_64"
30+
QT_INSTALL_DIR: "${{ github.workspace }}/Qt"
31+
CMAKE_GENERATOR: "Ninja"
32+
BUILD_TYPE: "Release"
33+
DMG_PACKAGE_NAME: "qt6-omodsim"
34+
35+
steps:
36+
- name: Checkout repository
37+
uses: actions/checkout@v4
38+
with:
39+
ref: ${{ github.event.inputs.tag || github.event.inputs.branch || github.ref_name }}
40+
41+
- name: Determine ref_type and ref_name
42+
run: |
43+
if [ "${{ github.ref_type }}" = "tag" ] || [ -n "${{ github.event.inputs.tag }}" ]; then
44+
REF_TYPE="tags"
45+
if [ -n "${{ github.event.inputs.tag }}" ]; then
46+
REF_NAME="${{ github.event.inputs.tag }}"
47+
else
48+
REF_NAME="${{ github.ref_name }}"
49+
fi
50+
else
51+
REF_TYPE="heads"
52+
REF_NAME="${{ github.ref_name }}"
53+
fi
54+
echo "REF_TYPE=$REF_TYPE" >> $GITHUB_ENV
55+
echo "REF_NAME=$REF_NAME" >> $GITHUB_ENV
56+
57+
- name: Extract version from CMakeLists.txt
58+
run: |
59+
FULL_VERSION=$(grep -oE 'VERSION\s+[0-9]+\.[0-9]+\.[0-9]+' src/CMakeLists.txt | grep -oE '[0-9]+\.[0-9]+\.[0-9]+')
60+
61+
if [ "${GITHUB_REF_NAME}" = "dev" ] || [ "${{ github.event.inputs.branch }}" = "dev" ]; then
62+
MAJOR_MINOR=$(echo "$FULL_VERSION" | cut -d. -f1,2)
63+
APP_VERSION="${MAJOR_MINOR}~dev"
64+
else
65+
APP_VERSION="$FULL_VERSION"
66+
fi
67+
68+
echo "APP_VERSION=$APP_VERSION" >> $GITHUB_ENV
69+
echo "Extracted version: $APP_VERSION"
70+
71+
- name: Install dependencies
72+
run: |
73+
brew install ninja cmake
74+
75+
- name: Install Python (for aqtinstall)
76+
uses: actions/setup-python@v5
77+
with:
78+
python-version: "3.12"
79+
80+
- name: Install aqtinstall
81+
run: python -m pip install aqtinstall
82+
83+
- name: Download Qt
84+
run: |
85+
mkdir -p ${{ env.QT_INSTALL_DIR }}
86+
aqt install-qt \
87+
${{ env.QT_HOST }} \
88+
${{ env.QT_TARGET }} \
89+
${{ env.QT_VERSION }} \
90+
${{ env.QT_ARCH }} \
91+
-m qt5compat qtpdf qtserialport qtserialbus \
92+
-O ${{ env.QT_INSTALL_DIR }}
93+
94+
- name: Add Qt to PATH
95+
run: echo "${{ env.QT_INSTALL_DIR }}/${{ env.QT_VERSION }}/macos/bin" >> $GITHUB_PATH
96+
97+
- name: Set BUILD_DIR
98+
run: echo "BUILD_DIR=build-omodsim-Qt_${{ env.QT_VERSION }}_clang_64-${{ env.BUILD_TYPE }}" >> $GITHUB_ENV
99+
100+
- name: Configure project
101+
run: |
102+
cmake src -B ${{ env.BUILD_DIR }} \
103+
-G "${{ env.CMAKE_GENERATOR }}" \
104+
-DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} \
105+
-DCMAKE_PREFIX_PATH=${{ env.QT_INSTALL_DIR }}/${{ env.QT_VERSION }}/macos \
106+
-DUSE_QT6=ON
107+
108+
- name: Build
109+
run: cmake --build ${{ env.BUILD_DIR }} --config ${{ env.BUILD_TYPE }} --parallel
110+
111+
- name: Deploy Qt dependencies using macdeployqt
112+
run: |
113+
"${{ env.QT_INSTALL_DIR }}/${{ env.QT_VERSION }}/macos/bin/macdeployqt" \
114+
"${{ env.BUILD_DIR }}/omodsim.app" \
115+
-always-overwrite
116+
117+
- name: Copy docs into app bundle
118+
run: |
119+
mkdir -p "${{ env.BUILD_DIR }}/omodsim.app/Contents/Resources/docs"
120+
cp -R "${{ env.BUILD_DIR }}/docs/"* "${{ env.BUILD_DIR }}/omodsim.app/Contents/Resources/docs/"
121+
122+
- name: Create DMG
123+
run: |
124+
DMG_NAME="${{ env.DMG_PACKAGE_NAME }}_${{ env.APP_VERSION }}_macos.dmg"
125+
echo "DMG_NAME=$DMG_NAME" >> $GITHUB_ENV
126+
127+
hdiutil create -volname "Open ModSim ${{ env.APP_VERSION }}" \
128+
-srcfolder "${{ env.BUILD_DIR }}/omodsim.app" \
129+
-ov -format UDZO \
130+
"$DMG_NAME"
131+
132+
- name: Upload DMG
133+
uses: actions/upload-artifact@v4
134+
if: success()
135+
with:
136+
name: ${{ env.DMG_NAME }}
137+
path: ${{ env.DMG_NAME }}
138+
139+
- name: Create or update GitHub Release and upload DMG
140+
if: false # Temporarily disable release creation until we have a stable release process in place
141+
# if: success() && github.event_name == 'push' && github.ref_type == 'tag'
142+
uses: softprops/action-gh-release@v2
143+
with:
144+
draft: true
145+
tag_name: ${{ github.ref_name }}
146+
name: Open ModSim ${{ env.APP_VERSION }}
147+
files: |
148+
${{ env.DMG_NAME }}
149+
env:
150+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/build-installer-qt5-win32.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
branch:
1010
description: 'Checkout branch'
1111
required: false
12-
default: dev
12+
default: release/1.x
1313
tag:
1414
description: 'Checkout tag'
1515
required: false
@@ -42,7 +42,7 @@ jobs:
4242

4343
steps:
4444
- name: Checkout repository
45-
uses: actions/checkout@v4
45+
uses: actions/checkout@v6
4646
with:
4747
ref: ${{ github.event.inputs.tag || github.event.inputs.branch || github.ref_name }}
4848

@@ -52,7 +52,7 @@ jobs:
5252
shell: cmd
5353

5454
- name: Convert version for dev branch
55-
if: ${{ github.ref_name == 'dev' || github.event.inputs.branch == 'dev' }}
55+
if: ${{ github.ref_name == 'dev' || github.event.inputs.branch == 'dev' || startsWith(github.ref_name, 'release/') || startsWith(github.event.inputs.branch, 'release/') }}
5656
run: |
5757
for /f "tokens=1,2 delims=." %%a in ("%APP_VERSION%") do (
5858
echo APP_VERSION=%%a.%%b-dev>>%GITHUB_ENV%
@@ -91,7 +91,7 @@ jobs:
9191
shell: cmd
9292

9393
- name: Install Python (for aqtinstall)
94-
uses: actions/setup-python@v5
94+
uses: actions/setup-python@v6
9595
with:
9696
python-version: "3.11"
9797

@@ -137,7 +137,7 @@ jobs:
137137

138138
- name: Upload Executable
139139
id: upload-exe
140-
uses: actions/upload-artifact@v4
140+
uses: actions/upload-artifact@v7
141141
if: success()
142142
with:
143143
name: omodsim-${{ env.APP_VERSION }}_${{ env.ARCH }}.exe
@@ -158,7 +158,7 @@ jobs:
158158
wait-for-completion-timeout-in-seconds: 3600
159159

160160
- name: Upload signed Executable
161-
uses: actions/upload-artifact@v4
161+
uses: actions/upload-artifact@v7
162162
if: success() && env.SIGNING_POLICY_SLUG != 'none'
163163
with:
164164
name: omodsim-${{ env.APP_VERSION }}_${{ env.ARCH }}-signed.exe
@@ -197,7 +197,7 @@ jobs:
197197

198198
- name: Upload Installer
199199
id: upload-installer
200-
uses: actions/upload-artifact@v4
200+
uses: actions/upload-artifact@v7
201201
if: success()
202202
with:
203203
name: qt5-omodsim-${{ env.APP_VERSION }}_${{ env.ARCH }}
@@ -218,7 +218,7 @@ jobs:
218218
wait-for-completion-timeout-in-seconds: 3600
219219

220220
- name: Upload signed Installer
221-
uses: actions/upload-artifact@v4
221+
uses: actions/upload-artifact@v7
222222
if: success() && env.SIGNING_POLICY_SLUG != 'none'
223223
with:
224224
name: qt5-omodsim-${{ env.APP_VERSION }}_${{ env.ARCH }}-signed

.github/workflows/build-installer-qt5-win64.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
branch:
1010
description: 'Checkout branch'
1111
required: false
12-
default: dev
12+
default: release/1.x
1313
tag:
1414
description: 'Checkout tag'
1515
required: false
@@ -41,7 +41,7 @@ jobs:
4141

4242
steps:
4343
- name: Checkout repository
44-
uses: actions/checkout@v4
44+
uses: actions/checkout@v6
4545
with:
4646
ref: ${{ github.event.inputs.tag || github.event.inputs.branch || github.ref_name }}
4747

@@ -51,7 +51,7 @@ jobs:
5151
shell: cmd
5252

5353
- name: Convert version for dev branch
54-
if: ${{ github.ref_name == 'dev' || github.event.inputs.branch == 'dev' }}
54+
if: ${{ github.ref_name == 'dev' || github.event.inputs.branch == 'dev' || startsWith(github.ref_name, 'release/') || startsWith(github.event.inputs.branch, 'release/') }}
5555
run: |
5656
for /f "tokens=1,2 delims=." %%a in ("%APP_VERSION%") do (
5757
echo APP_VERSION=%%a.%%b-dev>>%GITHUB_ENV%
@@ -90,7 +90,7 @@ jobs:
9090
shell: cmd
9191

9292
- name: Install Python (for aqtinstall)
93-
uses: actions/setup-python@v5
93+
uses: actions/setup-python@v6
9494
with:
9595
python-version: "3.11"
9696

@@ -136,7 +136,7 @@ jobs:
136136

137137
- name: Upload Executable
138138
id: upload-exe
139-
uses: actions/upload-artifact@v4
139+
uses: actions/upload-artifact@v7
140140
if: success()
141141
with:
142142
name: omodsim-${{ env.APP_VERSION }}_${{ env.CMAKE_ARCH }}.exe
@@ -157,7 +157,7 @@ jobs:
157157
wait-for-completion-timeout-in-seconds: 3600
158158

159159
- name: Upload signed Executable
160-
uses: actions/upload-artifact@v4
160+
uses: actions/upload-artifact@v7
161161
if: success() && env.SIGNING_POLICY_SLUG != 'none'
162162
with:
163163
name: omodsim-${{ env.APP_VERSION }}_${{ env.CMAKE_ARCH }}-signed.exe
@@ -196,7 +196,7 @@ jobs:
196196

197197
- name: Upload Installer
198198
id: upload-installer
199-
uses: actions/upload-artifact@v4
199+
uses: actions/upload-artifact@v7
200200
if: success()
201201
with:
202202
name: qt5-omodsim-${{ env.APP_VERSION }}_${{ env.CMAKE_ARCH }}
@@ -217,7 +217,7 @@ jobs:
217217
wait-for-completion-timeout-in-seconds: 3600
218218

219219
- name: Upload signed Installer
220-
uses: actions/upload-artifact@v4
220+
uses: actions/upload-artifact@v7
221221
if: success() && env.SIGNING_POLICY_SLUG != 'none'
222222
with:
223223
name: qt5-omodsim-${{ env.APP_VERSION }}_${{ env.CMAKE_ARCH }}-signed

0 commit comments

Comments
 (0)