Skip to content

Commit

Permalink
Merge branch 'development' into feature/copy-on-write-types
Browse files Browse the repository at this point in the history
  • Loading branch information
d1vanov committed Jan 20, 2025
2 parents feba25e + 99fb048 commit c1abab2
Show file tree
Hide file tree
Showing 3 changed files with 80 additions and 45 deletions.
109 changes: 72 additions & 37 deletions .github/workflows/build_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,12 @@ jobs:
compiler_cpp: 'clang++'

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install non-Qt dependencies
id: install_non_qt_deps
run: |
sudo apt-get -qq update
sudo apt-get -qq install cmake ninja-build p7zip-full coreutils curl
- name: Install gcc
Expand Down Expand Up @@ -111,20 +112,22 @@ jobs:
- name: Upload QEverCloudGenerator artifact
id: upload_artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: QEverCloudGenerator_linux
path: '${{ github.workspace }}/build/installdir/bin/QEverCloudGenerator'
if: ${{ matrix.qt_version == '5.15.4' && matrix.compiler_cpp == 'g++' }}

build_macos:
if: "!contains(github.event.head_commit.message, '[skip ci]')"
runs-on: macos-11
runs-on: macos-13
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Setup cmake
uses: jwlawson/actions-setup-cmake@v1.13
uses: jwlawson/actions-setup-cmake@v2
with:
cmake-version: '3.30.x'

- name: Setup ninja
env:
Expand All @@ -138,7 +141,7 @@ jobs:
- name: Cache Qt 5.15.2
id: cache_qt5
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: '${{ runner.workspace }}/Qt5'
key: ${{ runner.os }}-Qt5Cache
Expand All @@ -154,7 +157,6 @@ jobs:
target: desktop
install-deps: true
arch: clang_64
modules: 'qtwebengine'
dir: '${{ runner.workspace }}/Qt5'

- name: Build and install
Expand All @@ -170,7 +172,7 @@ jobs:
- name: Upload QEverCloudGenerator artifact
id: upload_artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: QEverCloudGenerator_macos
path: ${{ github.workspace }}/build/installdir/bin/QEverCloudGenerator
Expand All @@ -185,11 +187,11 @@ jobs:
- target_arch: 'x64'

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Cache Qt 5.15.2 x86
id: cache_qt_x86
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: '${{ runner.workspace }}/Qt_x86'
key: ${{ runner.os }}-QtCache-x86
Expand All @@ -211,7 +213,7 @@ jobs:

- name: Cache Qt 5.15.2 x64
id: cache_qt_x64
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: '${{ runner.workspace }}/Qt_x64'
key: ${{ runner.os }}-QtCache-x64
Expand Down Expand Up @@ -261,15 +263,15 @@ jobs:

- name: Upload x86 QEverCloudGenerator
id: upload_artifact_x86
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: QEverCloudGenerator_windows_x86
path: '${{ github.workspace }}\build\installdir\bin\QEverCloudGenerator.exe'
if: ${{ matrix.target_arch == 'x86' }}

- name: Upload x64 QEverCloudGenerator
id: upload_artifact_x64
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: QEverCloudGenerator_windows_x64
path: '${{ github.workspace }}\build\installdir\bin\QEverCloudGenerator.exe'
Expand Down Expand Up @@ -306,72 +308,78 @@ jobs:
if [ "${exit_status}" = 0 ]; then
export COMMIT_SHA=$(cat /tmp/gh_get_release.json | jq '.target_commitish');
if ! [ "${COMMIT_SHA}" = "${GITHUB_SHA}" ]; then
gh release delete continuous-${BRANCH_NAME} -y -R d1vanov/QEverCloudGenerator;
curl -X DELETE -H "Authorization: token ${GITHUB_TOKEN}" -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/d1vanov/QEverCloudGenerator/git/refs/tags/continuous-${BRANCH_NAME};
export PREVIOUS_CONTINUOUS_RELEASE_DELETED=0
for i in {1..10}
do
echo "Trying to delete previous continuous release continuous-${BRANCH_NAME}"
gh release delete continuous-${BRANCH_NAME} -y -R d1vanov/QEverCloudGenerator;
curl -X DELETE -H "Authorization: token ${GITHUB_TOKEN}" -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/d1vanov/QEverCloudGenerator/git/refs/tags/continuous-${BRANCH_NAME};
gh api /repos/d1vanov/QEverCloudGenerator/releases/tags/continuous-${BRANCH_NAME} > /tmp/gh_get_release.json && exit_status=$? || exit_status=$?
if [ "${exit_status}" != 0 ]; then
echo "It appears that previous continuous release is deleted now"
export PREVIOUS_CONTINUOUS_RELEASE_DELETED=1
break
fi
echo "Was able to receive information about the attempted to be deleted previous continuous release, waiting for 5 seconds before the next attempt"
sleep 5
done
if [ "$PREVIOUS_CONTINUOUS_RELEASE_DELETED" != "1" ]; then
echo "Failed to delete previous continuous release after several attempts!"
fi
fi
fi
shell: bash

- name: Create new continuous master release
id: create_new_continuous_master_release
if: ${{ github.ref == 'refs/heads/master' }}
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: continuous-master
release_name: Continuous build (continuous-master)
draft: false
prerelease: true
run: |
gh release create continuous-master --draft=false --prerelease --title "Continuous build (continuous-master)" --target $GITHUB_SHA -R d1vanov/QEverCloudGenerator
- name: Create new continuous development release
id: create_new_continuous_development_release
if: ${{ github.ref == 'refs/heads/development' }}
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: continuous-development
release_name: Continuous build (continuous-development)
draft: false
prerelease: true
run: |
gh release create continuous-development --draft=false --prerelease --title "Continuous build (continuous-development)" --target $GITHUB_SHA -R d1vanov/QEverCloudGenerator
- name: Create new tagged release
id: create_new_tagged_release
if: ${{ github.ref != 'refs/heads/master' && github.ref != 'refs/heads/development' }}
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release build (${{ github.ref }})
draft: false
prerelease: false
GITHUB_REF: ${{ github.ref }}
GITHUB_REF_NAME: ${{ github.ref_name }}
run: |
gh release create "$GITHUB_REF" --draft=false --title "Release build ($GITHUB_REF_NAME)" --target $GITHUB_SHA -R d1vanov/QEverCloudGenerator
- name: Download linux artifact
id: download_linux_artifact
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: QEverCloudGenerator_linux
path: '${{ github.workspace }}/artifacts/linux/QEverCloudGenerator'

- name: Download macOS artifact
id: download_macos_artifact
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: QEverCloudGenerator_macos
path: '${{ github.workspace }}/artifacts/macos/QEverCloudGenerator'

- name: Download Windows x86 artifact
id: download_windows_x86_artifact
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: QEverCloudGenerator_windows_x86
path: '${{ github.workspace }}/artifacts/windows/x86/QEverCloudGenerator.exe'

- name: Download Windows x64 artifact
id: download_windows_x64_artifact
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: QEverCloudGenerator_windows_x64
path: '${{ github.workspace }}/artifacts/windows/x64/QEverCloudGenerator.exe'
Expand Down Expand Up @@ -564,6 +572,24 @@ jobs:
if: ${{ github.ref == 'refs/heads/development' }}
shell: bash

- name: Ensure continuous master release is not a draft
id: ensure_continuous_master_is_not_a_draft
if: ${{ github.ref == 'refs/heads/master' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_REF: ${{ github.ref }}
run: |
gh release edit continuous-master --draft=false -R d1vanov/QEverCloudGenerator
- name: Ensure continuous development release is not a draft
id: ensure_continuous_development_is_not_a_draft
if: ${{ github.ref == 'refs/heads/development' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_REF: ${{ github.ref }}
run: |
gh release edit continuous-development --draft=false -R d1vanov/QEverCloudGenerator
- name: Upload Linux artifact to tagged release
id: upload_linux_artifact_to_tagged_release
env:
Expand Down Expand Up @@ -651,3 +677,12 @@ jobs:
fi
if: ${{ github.ref != 'refs/heads/master' && github.ref != 'refs/heads/development' }}
shell: bash

- name: Ensure tagged release is not a draft
id: ensure_tagged_release_is_not_a_draft
if: ${{ github.ref != 'refs/heads/master' && github.ref != 'refs/heads/development' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_REF_NAME: ${{ github.ref_name }}
run: |
gh release edit "$GITHUB_REF_NAME" --draft=false -R d1vanov/QEverCloudGenerator
12 changes: 6 additions & 6 deletions lemon/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@ static struct action *Action_new(void);
static struct action *Action_sort(struct action *);

/********** From the file "build.h" ************************************/
void FindRulePrecedences(struct lemon *);
void FindFirstSets(struct lemon *);
void FindStates(struct lemon *);
void FindLinks(struct lemon *);
void FindFollowSets(struct lemon *);
void FindActions(struct lemon *);
void FindRulePrecedences(struct lemon *xp);
void FindFirstSets(struct lemon *lemp);
void FindStates(struct lemon *lemp);
void FindLinks(struct lemon *lemp);
void FindFollowSets(struct lemon *lemp);
void FindActions(struct lemon *lemp);

/********* From the file "configlist.h" *********************************/
void Configlist_init(void);
Expand Down
4 changes: 2 additions & 2 deletions thrift_parser/Generator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
*
* The MIT License (MIT)
*
* Copyright (c) 2015 Sergey Skoblikov, 2015-2023 Dmitry Ivanov
* Copyright (c) 2015 Sergey Skoblikov, 2015-2025 Dmitry Ivanov
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -57,7 +57,7 @@ constexpr const char * blockSeparator =
constexpr const char * disclaimer =
"/**\n"
" * Original work: Copyright (c) 2014 Sergey Skoblikov\n"
" * Modified work: Copyright (c) 2015-2023 Dmitry Ivanov\n"
" * Modified work: Copyright (c) 2015-2025 Dmitry Ivanov\n"
" *\n"
" * This file is a part of QEverCloud project and is distributed under "
"the terms\n"
Expand Down

0 comments on commit c1abab2

Please sign in to comment.