Skip to content

Commit d4af966

Browse files
authored
Merge pull request #65 from jose-rZM/release/1.0.4
Release/1.0.4
2 parents 836c5e0 + 5201b54 commit d4af966

File tree

2,205 files changed

+43210
-33338
lines changed

Some content is hidden

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

2,205 files changed

+43210
-33338
lines changed

.github/workflows/main.yml

Lines changed: 114 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ name: Build & Deploy Qt6 App
22

33
on:
44
push:
5-
branches: [ main ]
5+
branches:
6+
- main
7+
- release/**
68
paths:
79
- '**/*.cpp'
810
- '**/*.hpp'
@@ -19,12 +21,12 @@ jobs:
1921
steps:
2022
- name: Checkout source
2123
uses: actions/checkout@v3
22-
24+
2325
- name: Install dbus
2426
run: |
2527
brew update
2628
brew install dbus
27-
29+
2830
- name: Install Qt6
2931
run: |
3032
brew install qt@6
@@ -38,7 +40,7 @@ jobs:
3840
- name: Verify arch
3941
run: |
4042
lipo -info SyntaxTutor.app/Contents/MacOS/SyntaxTutor
41-
43+
4244
- name: Prepare icons
4345
run: |
4446
mkdir -p MyIcon.iconset
@@ -59,12 +61,12 @@ jobs:
5961
- name: Prepare .app bundle
6062
run: |
6163
APP="SyntaxTutor.app"
62-
64+
6365
chmod +x "$APP/Contents/MacOS/SyntaxTutor"
6466
mkdir -p "$APP/Contents/Resources"
6567
cp resources/SyntaxTutor.icns "$APP/Contents/Resources/SyntaxTutor.icns"
6668
chmod 644 "$APP/Contents/Resources/SyntaxTutor.icns"
67-
69+
6870
cat > "$APP/Contents/Info.plist" << 'EOF'
6971
<?xml version="1.0" encoding="UTF-8"?>
7072
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
@@ -117,8 +119,8 @@ jobs:
117119
- name: Upload artifact
118120
uses: actions/upload-artifact@v4
119121
with:
120-
name: SyntaxTutor-macos-intel
121-
path: SyntaxTutor-intel.zip
122+
name: SyntaxTutor-macos-intel
123+
path: SyntaxTutor-intel.zip
122124
build-macos:
123125
runs-on: macos-latest
124126
steps:
@@ -129,7 +131,7 @@ jobs:
129131
run: |
130132
brew update
131133
brew install dbus
132-
134+
133135
- name: Install Qt6
134136
run: |
135137
brew install qt@6
@@ -214,17 +216,16 @@ jobs:
214216
run: |
215217
codesign --deep --force --options runtime --entitlements entitlements.plist --sign - SyntaxTutor.app
216218
217-
- name: Create ZIP of .app
219+
- name: Create ZIP of .app (arm64)
218220
run: |
219-
ditto -c -k --keepParent SyntaxTutor.app SyntaxTutor.zip
221+
zip -qry SyntaxTutor-macos-arm64.zip SyntaxTutor.app
220222
221223
- name: Upload artifacts
222224
uses: actions/upload-artifact@v4
223225
with:
224226
name: SyntaxTutor-macos-arm64
225-
path: |
226-
SyntaxTutor.app
227-
227+
path: SyntaxTutor-macos-arm64.zip
228+
228229
build-windows:
229230
runs-on: windows-latest
230231
steps:
@@ -237,7 +238,7 @@ jobs:
237238
version: '6.8.3'
238239
target: 'desktop'
239240
arch: 'win64_msvc2022_64'
240-
241+
241242
- name: Setup MSVC env
242243
uses: ilammy/msvc-dev-cmd@v1
243244
with:
@@ -263,11 +264,15 @@ jobs:
263264
Copy-Item .\release\SyntaxTutor.exe deploy\
264265
windeployqt --release .\deploy\SyntaxTutor.exe --dir deploy
265266
266-
- name: Upload Windows ZIP
267+
- name: Zip Windows bundle
268+
run: powershell Compress-Archive -Path deploy -DestinationPath SyntaxTutor-windows-x64.zip
269+
270+
- name: Upload zipped Windows bundle
267271
uses: actions/upload-artifact@v4
268272
with:
269273
name: SyntaxTutor-windows-x64
270-
path: deploy
274+
path: SyntaxTutor-windows-x64.zip
275+
271276

272277
build-linux:
273278
runs-on: ubuntu-latest
@@ -280,7 +285,7 @@ jobs:
280285
with:
281286
version: 6.8.2
282287
cache: true
283-
288+
284289
- name: Configure with qmake
285290
run: |
286291
qmake6 -r -config release
@@ -294,7 +299,7 @@ jobs:
294299
export APPIMAGE_EXTRACT_AND_RUN=1
295300
export LD_VER=continuous
296301
APPDIR=SyntaxTutor.AppDir
297-
302+
298303
wget -q https://github.com/linuxdeploy/linuxdeploy/releases/download/${LD_VER}/linuxdeploy-x86_64.AppImage \
299304
-O /usr/local/bin/linuxdeploy && \
300305
chmod +x /usr/local/bin/linuxdeploy && \
@@ -304,7 +309,7 @@ jobs:
304309
305310
mkdir -p $APPDIR/usr/bin \
306311
$APPDIR/usr/share/icons/hicolor/256x256/apps
307-
312+
308313
cp SyntaxTutor $APPDIR/usr/bin/ && \
309314
printf '[Desktop Entry]\nType=Application\nIcon=syntaxtutor\nName=SyntaxTutor\nExec=SyntaxTutor\nCategories=Education;\n' > $APPDIR/SyntaxTutor.desktop && \
310315
chmod +x $APPDIR/SyntaxTutor.desktop && \
@@ -323,3 +328,92 @@ jobs:
323328
with:
324329
name: SyntaxTutor-linux-x86_64
325330
path: '*.AppImage'
331+
332+
publish-prerelease:
333+
if: github.ref == 'refs/heads/main'
334+
name: Publish prerelease
335+
runs-on: ubuntu-latest
336+
needs:
337+
- build-macos-intel
338+
- build-macos
339+
- build-windows
340+
- build-linux
341+
permissions:
342+
contents: write
343+
steps:
344+
- name: Checkout source
345+
uses: actions/checkout@v3
346+
347+
- name: Determine release version
348+
id: version
349+
run: |
350+
VERSION=$(tr -d ' \r\n' < APP_VERSION)
351+
if [ -z "$VERSION" ]; then
352+
echo "VERSION file is empty" >&2
353+
exit 1
354+
fi
355+
echo "value=$VERSION" >> "$GITHUB_OUTPUT"
356+
357+
- name: Download macOS (Intel) artifact
358+
uses: actions/download-artifact@v4
359+
with:
360+
name: SyntaxTutor-macos-intel
361+
path: dist/macos-intel
362+
363+
- name: Download macOS (Apple Silicon) artifact
364+
uses: actions/download-artifact@v4
365+
with:
366+
name: SyntaxTutor-macos-arm64
367+
path: dist/macos-arm64
368+
369+
- name: Download Windows artifact
370+
uses: actions/download-artifact@v4
371+
with:
372+
name: SyntaxTutor-windows-x64
373+
path: dist/windows-x64
374+
375+
- name: Download Linux artifact
376+
uses: actions/download-artifact@v4
377+
with:
378+
name: SyntaxTutor-linux-x86_64
379+
path: dist/linux-x86_64
380+
381+
- name: Prepare release assets
382+
run: |
383+
set -euo pipefail
384+
mkdir -p dist/uploads
385+
386+
if [ -f dist/macos-intel/SyntaxTutor-intel.zip ]; then
387+
cp dist/macos-intel/SyntaxTutor-intel.zip dist/uploads/
388+
fi
389+
390+
if [ -d dist/macos-arm64/SyntaxTutor.app ]; then
391+
(cd dist/macos-arm64 && zip -qry ../uploads/SyntaxTutor-macos-arm64.zip SyntaxTutor.app)
392+
fi
393+
394+
if [ -d dist/windows-x64/deploy ]; then
395+
(cd dist/windows-x64 && zip -qry ../uploads/SyntaxTutor-windows-x64.zip deploy)
396+
fi
397+
398+
LINUX_APPIMAGE=$(find dist/linux-x86_64 -maxdepth 1 -type f -name '*.AppImage' | head -n 1)
399+
if [ -n "$LINUX_APPIMAGE" ]; then
400+
cp "$LINUX_APPIMAGE" dist/uploads/
401+
fi
402+
403+
echo "Prepared artifacts:" >&2
404+
ls -al dist/uploads >&2
405+
406+
- name: Publish GitHub prerelease
407+
uses: softprops/action-gh-release@v2
408+
with:
409+
tag_name: v${{ steps.version.outputs.value }}
410+
name: SyntaxTutor v${{ steps.version.outputs.value }} (prerelease)
411+
body: |
412+
Automated prerelease for commit ${{ github.sha }}.
413+
prerelease: true
414+
files: dist/uploads/*
415+
fail_on_unmatched_files: true
416+
draft: false
417+
allowUpdates: true
418+
env:
419+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/sonarcloud.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ jobs:
2222
- uses: actions/checkout@v4
2323
with:
2424
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
25-
25+
2626
- name: Install Build Wrapper
2727
uses: SonarSource/sonarqube-scan-action/install-build-wrapper@v5
28-
28+
2929
- name: Build backend tests with coverage
3030
run: |
3131
sudo apt-get update
@@ -34,14 +34,14 @@ jobs:
3434
cd $GITHUB_WORKSPACE
3535
build-wrapper-linux-x86-64 --out-dir ${{ env.BUILD_WRAPPER_OUT_DIR }} \
3636
g++ -std=gnu++2a -O0 -g --coverage -fprofile-arcs -ftest-coverage \
37-
backend/grammar.cpp \
38-
backend/grammar_factory.cpp \
39-
backend/ll1_parser.cpp \
40-
backend/lr0_item.cpp \
41-
backend/slr1_parser.cpp \
42-
backend/symbol_table.cpp \
43-
backend/tests.cpp \
44-
-Ibackend/include \
37+
src/backend/grammar.cpp \
38+
src/backend/grammar_factory.cpp \
39+
src/backend/ll1_parser.cpp \
40+
src/backend/lr0_item.cpp \
41+
src/backend/slr1_parser.cpp \
42+
src/backend/symbol_table.cpp \
43+
src/backend/tests.cpp \
44+
-Isrc/backend \
4545
-lgtest -lgtest_main \
4646
-o test_runner
4747
@@ -52,9 +52,9 @@ jobs:
5252
run: |
5353
sudo apt-get update
5454
sudo apt-get install -y gcovr
55-
gcovr -r . --filter '.*backend/.*' --exclude-unreachable-branches --exclude-throw-branches --sonarqube --output coverage.xml
56-
57-
55+
gcovr -r . --filter '.*src/backend/.*' --exclude-unreachable-branches --exclude-throw-branches --sonarqube --output coverage.xml
56+
57+
5858
- name: SonarQube Scan
5959
uses: SonarSource/sonarqube-scan-action@v6
6060
env:

APP_VERSION

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
1.0.4

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
## [1.0.4] - 2025-11-08
6+
Minor usability improvements in user input handling and enhancements to the pre-release workflow to simlify future releases.
7+
### Added
8+
- Tutorial hint explaining the expected format used in SLR table question (H)
9+
10+
### Fixed
11+
- Remove all spaces in LL/SLR table questions (C-C' and H steps)
12+
513
## [1.0.3] - 2025-11-04
614
Minor usability improvements in user input handling.
715
### Added

0 commit comments

Comments
 (0)