diff --git a/.github/workflows/build_and_deploy.yml b/.github/workflows/build_and_deploy.yml index 904a471..38f64e9 100644 --- a/.github/workflows/build_and_deploy.yml +++ b/.github/workflows/build_and_deploy.yml @@ -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 @@ -111,7 +112,7 @@ 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' @@ -119,12 +120,14 @@ jobs: 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: @@ -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 @@ -154,7 +157,6 @@ jobs: target: desktop install-deps: true arch: clang_64 - modules: 'qtwebengine' dir: '${{ runner.workspace }}/Qt5' - name: Build and install @@ -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 @@ -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 @@ -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 @@ -261,7 +263,7 @@ 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' @@ -269,7 +271,7 @@ jobs: - 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' @@ -306,8 +308,24 @@ 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 @@ -315,63 +333,53 @@ jobs: - 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' @@ -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: @@ -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 diff --git a/lemon/main.c b/lemon/main.c index dd687bc..db33362 100644 --- a/lemon/main.c +++ b/lemon/main.c @@ -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); diff --git a/thrift_parser/Generator.cpp b/thrift_parser/Generator.cpp index d5ecaf0..8cc64bd 100644 --- a/thrift_parser/Generator.cpp +++ b/thrift_parser/Generator.cpp @@ -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 @@ -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"