From 367c0db5a466fb0f16e363417d49898c62305912 Mon Sep 17 00:00:00 2001 From: Akshay Pal Date: Tue, 4 Aug 2026 21:31:36 +0100 Subject: [PATCH 1/2] chore: fix debug build errors and add check for releases --- .github/workflows/pr-checks.yaml | 25 +++++++++++ .github/workflows/release-check.yaml | 44 +++++++++++++++++++ src/bloch/cli/cli.cpp | 1 - .../compiler/semantics/semantic_analyser.cpp | 2 +- src/bloch/runtime/runtime_evaluator.cpp | 2 +- tests/test_parser.cpp | 2 +- 6 files changed, 72 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/release-check.yaml diff --git a/.github/workflows/pr-checks.yaml b/.github/workflows/pr-checks.yaml index 51224af..379aaf7 100644 --- a/.github/workflows/pr-checks.yaml +++ b/.github/workflows/pr-checks.yaml @@ -66,3 +66,28 @@ jobs: run: ctest --test-dir build --output-on-failure - name: Run acceptance tests run: bash scripts/run_examples.sh build/bin/bloch + + debug-build: + name: Debug Build Check for Release + if: startsWith(github.head_ref, 'release-please-') + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y cmake g++ libssl-dev pkg-config + + - name: Configure CMake (Debug) + run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug + + - name: Build + run: cmake --build build --parallel + + - name: Run unit and integration tests + run: ctest --test-dir build --output-on-failure + + - name: Run acceptance tests + run: bash scripts/run_examples.sh build/bin/bloch diff --git a/.github/workflows/release-check.yaml b/.github/workflows/release-check.yaml new file mode 100644 index 0000000..1d5d7ba --- /dev/null +++ b/.github/workflows/release-check.yaml @@ -0,0 +1,44 @@ +name: Release Check + +on: + pull_request: + branches: + - develop + types: + - opened + - synchronize + - reopened + - ready_for_review + +permissions: + contents: read + +concurrency: + group: release-check-${{ github.event.pull_request.head.ref }} + cancel-in-progress: true + +jobs: + debug-build-and-test: + name: Release Debug build and test + if: startsWith(github.head_ref, 'release-please-') + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y cmake g++ libssl-dev pkg-config + + - name: Configure CMake (Debug) + run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug + + - name: Build + run: cmake --build build --parallel + + - name: Run unit and integration tests + run: ctest --test-dir build --output-on-failure + + - name: Run acceptance tests + run: bash scripts/run_examples.sh build/bin/bloch diff --git a/src/bloch/cli/cli.cpp b/src/bloch/cli/cli.cpp index a1bd105..9812406 100644 --- a/src/bloch/cli/cli.cpp +++ b/src/bloch/cli/cli.cpp @@ -190,7 +190,6 @@ namespace bloch::cli { bool shotsProvided = false; bool isCliShots = false; int cliShots = 1; - bool isAnnotationShots = false; std::string echoOpt; std::string file; diff --git a/src/bloch/compiler/semantics/semantic_analyser.cpp b/src/bloch/compiler/semantics/semantic_analyser.cpp index c92e6a3..b8e2bfe 100644 --- a/src/bloch/compiler/semantics/semantic_analyser.cpp +++ b/src/bloch/compiler/semantics/semantic_analyser.cpp @@ -3083,7 +3083,7 @@ namespace bloch::compiler { } } - void SemanticAnalyser::visit(Program& node) { + void SemanticAnalyser::visit(Program&) { // handled in analyse } diff --git a/src/bloch/runtime/runtime_evaluator.cpp b/src/bloch/runtime/runtime_evaluator.cpp index e9d9216..baf5aec 100644 --- a/src/bloch/runtime/runtime_evaluator.cpp +++ b/src/bloch/runtime/runtime_evaluator.cpp @@ -2219,7 +2219,7 @@ namespace bloch::runtime { "unsupported array literal type"); } return v; - } else if (auto thisExpr = dynamic_cast(e)) { + } else if (dynamic_cast(e)) { return lookup("this"); } else if (auto superExpr = dynamic_cast(e)) { (void)superExpr; diff --git a/tests/test_parser.cpp b/tests/test_parser.cpp index 313f766..faa407c 100644 --- a/tests/test_parser.cpp +++ b/tests/test_parser.cpp @@ -534,7 +534,7 @@ TEST(ParserTest, EmptyTypeArgumentListOutsideNewFails) { Lexer lexer(src); auto tokens = lexer.tokenize(); Parser parser(std::move(tokens)); - EXPECT_THROW(parser.parse(), BlochError); + EXPECT_THROW((void)parser.parse(), BlochError); } TEST(ParserTest, ParseArrayTypesAndIndexing) { From 71f360c44dfdf129e1d399a6b36765a73b4ccc00 Mon Sep 17 00:00:00 2001 From: Akshay Pal Date: Tue, 4 Aug 2026 21:34:23 +0100 Subject: [PATCH 2/2] chore: fix debug build errors and add check for releases --- .github/workflows/release-check.yaml | 44 ---------------------------- 1 file changed, 44 deletions(-) delete mode 100644 .github/workflows/release-check.yaml diff --git a/.github/workflows/release-check.yaml b/.github/workflows/release-check.yaml deleted file mode 100644 index 1d5d7ba..0000000 --- a/.github/workflows/release-check.yaml +++ /dev/null @@ -1,44 +0,0 @@ -name: Release Check - -on: - pull_request: - branches: - - develop - types: - - opened - - synchronize - - reopened - - ready_for_review - -permissions: - contents: read - -concurrency: - group: release-check-${{ github.event.pull_request.head.ref }} - cancel-in-progress: true - -jobs: - debug-build-and-test: - name: Release Debug build and test - if: startsWith(github.head_ref, 'release-please-') - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Install dependencies - run: | - sudo apt-get update - sudo apt-get install -y cmake g++ libssl-dev pkg-config - - - name: Configure CMake (Debug) - run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug - - - name: Build - run: cmake --build build --parallel - - - name: Run unit and integration tests - run: ctest --test-dir build --output-on-failure - - - name: Run acceptance tests - run: bash scripts/run_examples.sh build/bin/bloch