From 673a66563fe3926f515c43779edcab0d9648a1b2 Mon Sep 17 00:00:00 2001 From: SiddharthBITS Date: Thu, 16 Jan 2025 10:04:58 +0000 Subject: [PATCH 01/23] Implementing caching to 5X --- .../build-modified-postgres/action.yml | 39 +++++++++++++++++-- .../dump-restore-util/action.yml | 4 ++ .../install-dependencies/action.yml | 9 ----- .../minor-version-upgrade-util/action.yml | 4 ++ .../composite-actions/save-ccache/action.yml | 27 +++++++++++++ .../setup-base-version/action.yml | 4 ++ .../setup-new-version/action.yml | 4 ++ .../workflows/jdbc-tests-single-db-mode.yml | 4 ++ .github/workflows/major-version-upgrade.yml | 19 ++++----- 9 files changed, 90 insertions(+), 24 deletions(-) create mode 100644 .github/composite-actions/save-ccache/action.yml diff --git a/.github/composite-actions/build-modified-postgres/action.yml b/.github/composite-actions/build-modified-postgres/action.yml index cbd7f086b94..054752548de 100644 --- a/.github/composite-actions/build-modified-postgres/action.yml +++ b/.github/composite-actions/build-modified-postgres/action.yml @@ -24,11 +24,11 @@ inputs: runs: using: "composite" steps: - - name: Checkout, Build, and Install the Modified PostgreSQL Instance and Run Tests + - name: Remake engine repository run: | cd .. rm -rf postgresql_modified_for_babelfish - + if [[ $GITHUB_EVENT_NAME == "pull_request" ]]; then if [[ ${{inputs.engine_branch}} == "latest" ]]; then ENGINE_BRANCH=$GITHUB_HEAD_REF @@ -44,10 +44,41 @@ runs: fi REPOSITORY_OWNER=$GITHUB_REPOSITORY_OWNER fi - $GITHUB_WORKSPACE/.github/scripts/clone_engine_repo "$REPOSITORY_OWNER" "$ENGINE_BRANCH" cd postgresql_modified_for_babelfish - git rev-parse HEAD + rm -rf ~/.ccache + if [[ ${{inputs.tap_tests}} == "yes" ]]; then + echo "CCACHE_KEY=$(git rev-parse --short HEAD)-tapTest" >> $GITHUB_ENV + elif [[ ${{inputs.code_coverage}} == "yes" ]]; then + echo "CCACHE_KEY=$(git rev-parse --short HEAD)-coverage" >> $GITHUB_ENV + elif [[ ${{inputs.release_mode}} == "yes" ]]; then + echo "CCACHE_KEY=$(git rev-parse --short HEAD)-release" >> $GITHUB_ENV + else + echo "CCACHE_KEY=$(git rev-parse --short HEAD)-default" >> $GITHUB_ENV + fi + shell: bash + + - uses: actions/cache/restore@v4 + id: restore-ccache + if: ${{ github.event_name == 'pull_request' }} + with: + path: + ~/.ccache + key: + ${{ env.CCACHE_KEY }} + restore-keys: + ${{ env.CCACHE_KEY }} + + - name: Save cache if cache hit fails in pull requests + if: ${{ github.event_name == 'pull_request' }} && steps.restore-ccache.outputs.cache-matched-key == '' + run: | + echo "SAVE_CCACHE=1" >> $GITHUB_ENV + shell: bash + + - name: Build and Install the Modified PostgreSQL Instance and Run Tests + run: | + cd.. + cd postgresql_modified_for_babelfish if [[ ${{inputs.tap_tests}} == "yes" ]]; then ./configure CC='ccache gcc' --prefix=$HOME/${{ inputs.install_dir }}/ --with-python PYTHON=/usr/bin/python3.8 --enable-cassert CFLAGS="-ggdb" --with-libxml --with-uuid=ossp --with-icu --enable-tap-tests --with-gssapi elif [[ ${{inputs.code_coverage}} == "yes" ]]; then diff --git a/.github/composite-actions/dump-restore-util/action.yml b/.github/composite-actions/dump-restore-util/action.yml index 5d83d289722..fb73b5aeebe 100644 --- a/.github/composite-actions/dump-restore-util/action.yml +++ b/.github/composite-actions/dump-restore-util/action.yml @@ -327,6 +327,10 @@ runs: sqlcmd -S localhost -U jdbc_user -P 12345678 -Q "SELECT @@version GO" shell: bash + - name: Save cache + if: always() + uses: ./.github/composite-actions/save-ccache + - name: Run Verify Tests if: always() && steps.run-pg_dump-restore.outcome == 'success' && inputs.is_final_ver == 'true' uses: ./.github/composite-actions/run-verify-tests diff --git a/.github/composite-actions/install-dependencies/action.yml b/.github/composite-actions/install-dependencies/action.yml index de0912e518e..5a271c5e7f5 100644 --- a/.github/composite-actions/install-dependencies/action.yml +++ b/.github/composite-actions/install-dependencies/action.yml @@ -17,12 +17,3 @@ runs: source ~/.bashrc && echo $PATH echo "NOW=$(date +'%Y-%m-%dT%H:%M:%S')" >> $GITHUB_ENV shell: bash - - - name: Restore ccache - id: cache-compiler - uses: actions/cache@v3 - with: - path: ~/.ccache - key: ccache-${{ runner.os }}-${{ env.NOW }} - restore-keys: | - ccache-${{ runner.os }} diff --git a/.github/composite-actions/minor-version-upgrade-util/action.yml b/.github/composite-actions/minor-version-upgrade-util/action.yml index 00a4d5e79d5..4777d482db3 100644 --- a/.github/composite-actions/minor-version-upgrade-util/action.yml +++ b/.github/composite-actions/minor-version-upgrade-util/action.yml @@ -48,6 +48,10 @@ runs: install_dir: ${{ inputs.install_dir }} extension_branch: ${{ inputs.extension_branch }} + - name: Save cache + if: always() + uses: ./.github/composite-actions/save-cache-on-push + # Not created and used composite action update-extensions here since, in the previous step it has # checked out a branch/tag which may not have the updated update-extension composite action - name: Update extensions diff --git a/.github/composite-actions/save-ccache/action.yml b/.github/composite-actions/save-ccache/action.yml new file mode 100644 index 00000000000..fa76e7cc92b --- /dev/null +++ b/.github/composite-actions/save-ccache/action.yml @@ -0,0 +1,27 @@ +name: 'Save Ccache on push' + +runs: + using: "composite" + steps: + + - name: Setup new cache key + if: always() + run: | + echo "CCACHE_KEY=${{env.CCACHE_KEY}}-$(git rev-parse --short HEAD)" >> $GITHUB_ENV + shell: bash + + - uses: actions/cache/save@v4 + if: always() && ${{ env.CCACHE_KEY != '' && (github.event_name != 'pull_request' || env.SAVE_CCACHE == 1)}} + with: + path: + ~/.ccache + key: + ${{ env.CCACHE_KEY }} + + - name: Clean ccache directory and unset env variables + if: always() + shell: bash + run: | + rm -rf ~/.ccache + echo "CCACHE_KEY=" >> $GITHUB_ENV + echo "SAVE_CCACHE=" >> $GITHUB_ENV \ No newline at end of file diff --git a/.github/composite-actions/setup-base-version/action.yml b/.github/composite-actions/setup-base-version/action.yml index 628518778c2..9d6f6b96126 100644 --- a/.github/composite-actions/setup-base-version/action.yml +++ b/.github/composite-actions/setup-base-version/action.yml @@ -221,6 +221,10 @@ runs: - uses: actions/checkout@v2 + - name: Save cache + if: always() && steps.jdbc-upgrade-tests.outcome == 'success' + uses: ./.github/composite-actions/save-ccache + - name: Install Python id: install-python if: ${{ matrix.upgrade-path.path[0] == 'source_latest' && steps.jdbc-upgrade-tests.outcome == 'success' }} diff --git a/.github/composite-actions/setup-new-version/action.yml b/.github/composite-actions/setup-new-version/action.yml index 2138d1cf418..aaa1c0adf0a 100644 --- a/.github/composite-actions/setup-new-version/action.yml +++ b/.github/composite-actions/setup-new-version/action.yml @@ -64,6 +64,10 @@ runs: with: install_dir: ${{ inputs.pg_new_dir }} + - name: Save cache + if: always() && steps.build-postgis-extension == 'success' + uses: ./.github/composite-actions/save-ccache + - name: Setup new data directory id: setup-new-datadir if: always() && steps.build-postgis-extension.outcome == 'success' diff --git a/.github/workflows/jdbc-tests-single-db-mode.yml b/.github/workflows/jdbc-tests-single-db-mode.yml index 8f470d66b5a..eb36a0d9d24 100644 --- a/.github/workflows/jdbc-tests-single-db-mode.yml +++ b/.github/workflows/jdbc-tests-single-db-mode.yml @@ -102,6 +102,10 @@ jobs: ~/psql/data/logfile ~/psql/data_5433/logfile + - name: Save cache + if: always() && steps.replication.outcome == 'success' + uses: ./.github/composite-actions/save-ccache + # The test summary files contain paths with ':' characters, which is not allowed with the upload-artifact actions - name: Rename Test Summary Files id: test-file-rename diff --git a/.github/workflows/major-version-upgrade.yml b/.github/workflows/major-version-upgrade.yml index e98cedce619..bf0365f49d1 100644 --- a/.github/workflows/major-version-upgrade.yml +++ b/.github/workflows/major-version-upgrade.yml @@ -20,18 +20,11 @@ jobs: - name: Build Modified Postgres using ${{env.ENGINE_BRANCH_FROM}} id: build-modified-postgres-old + uses: ./.github/composite-actions/build-modified-postgres if: always() && steps.install-dependencies.outcome == 'success' - run: | - cd .. - git clone --branch ${{env.ENGINE_BRANCH_FROM}} https://github.com/babelfish-for-postgresql/postgresql_modified_for_babelfish.git - cd postgresql_modified_for_babelfish - ./configure --prefix=$HOME/${{env.OLD_INSTALL_DIR}} --with-python PYTHON=/usr/bin/python3.8 --enable-cassert CFLAGS="-ggdb" --with-libxml --with-uuid=ossp --with-icu - make clean - make -j 4 - make install - make check - cd contrib && make && sudo make install - shell: bash + with: + engine_branch: ${{ env.ENGINE_BRANCH_FROM }} + install_dir: ${{ env.OLD_INSTALL_DIR }} - name: Compile ANTLR id: compile-antlr @@ -130,6 +123,10 @@ jobs: - uses: actions/checkout@v2 + - name: Save cache + if: always() && steps.build-extensions-old.outcome == 'success' + uses: ./.github/composite-actions/save-ccache + - name: Build Modified Postgres using latest version id: build-modified-postgres-new if: always() && steps.install-extensions-old.outcome == 'success' From 6699732704a19d2ec00e7b855ce789901d38e383 Mon Sep 17 00:00:00 2001 From: SiddharthBITS Date: Thu, 16 Jan 2025 10:06:58 +0000 Subject: [PATCH 02/23] Disabling tests and adding more save spots --- .../composite-actions/minor-version-upgrade-util/action.yml | 4 ++-- .github/workflows/minor-version-upgrade.yml | 4 ++++ test/JDBC/jdbc_schedule | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/composite-actions/minor-version-upgrade-util/action.yml b/.github/composite-actions/minor-version-upgrade-util/action.yml index 4777d482db3..66767d0452a 100644 --- a/.github/composite-actions/minor-version-upgrade-util/action.yml +++ b/.github/composite-actions/minor-version-upgrade-util/action.yml @@ -49,8 +49,8 @@ runs: extension_branch: ${{ inputs.extension_branch }} - name: Save cache - if: always() - uses: ./.github/composite-actions/save-cache-on-push + if: always() && steps.build-extensions-newer == 'success' + uses: ./.github/composite-actions/save-ccache # Not created and used composite action update-extensions here since, in the previous step it has # checked out a branch/tag which may not have the updated update-extension composite action diff --git a/.github/workflows/minor-version-upgrade.yml b/.github/workflows/minor-version-upgrade.yml index 3adc33bf2fc..a5d41afda81 100644 --- a/.github/workflows/minor-version-upgrade.yml +++ b/.github/workflows/minor-version-upgrade.yml @@ -111,6 +111,10 @@ jobs: - uses: actions/checkout@v2 + - name: Save cache + if: always() && steps.build-extensions-older.outcome == 'success' + uses: ./.github/composite-actions/save-ccache + - name: Build and run tests for Postgres engine using latest engine id: build-modified-postgres-newer if: always() && steps.install-extensions-older.outcome == 'success' diff --git a/test/JDBC/jdbc_schedule b/test/JDBC/jdbc_schedule index 79ebd44a958..b2618fad775 100644 --- a/test/JDBC/jdbc_schedule +++ b/test/JDBC/jdbc_schedule @@ -8,7 +8,7 @@ # new line # 6. If you want the framework to not run certain files, use: ignore#!# -all +#all # BABEL-SP_FKEYS test is very slow and causing github action timeout. From bf2beb14b9bcc6a1fb5b04c566ce8a8694f0ceff Mon Sep 17 00:00:00 2001 From: SiddharthBITS Date: Thu, 16 Jan 2025 10:11:42 +0000 Subject: [PATCH 03/23] Fixing cd.. --- .github/composite-actions/build-modified-postgres/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/composite-actions/build-modified-postgres/action.yml b/.github/composite-actions/build-modified-postgres/action.yml index 054752548de..3beb14a4580 100644 --- a/.github/composite-actions/build-modified-postgres/action.yml +++ b/.github/composite-actions/build-modified-postgres/action.yml @@ -77,7 +77,7 @@ runs: - name: Build and Install the Modified PostgreSQL Instance and Run Tests run: | - cd.. + cd .. cd postgresql_modified_for_babelfish if [[ ${{inputs.tap_tests}} == "yes" ]]; then ./configure CC='ccache gcc' --prefix=$HOME/${{ inputs.install_dir }}/ --with-python PYTHON=/usr/bin/python3.8 --enable-cassert CFLAGS="-ggdb" --with-libxml --with-uuid=ossp --with-icu --enable-tap-tests --with-gssapi From 8cc746ccbe75ec945796afdddb7bea5b2e256a4b Mon Sep 17 00:00:00 2001 From: SiddharthBITS Date: Thu, 16 Jan 2025 11:30:03 +0000 Subject: [PATCH 04/23] Running tests again From bfceee4e086f9c0616e127965ca6081e82a229ad Mon Sep 17 00:00:00 2001 From: SiddharthBITS Date: Thu, 16 Jan 2025 12:42:31 +0000 Subject: [PATCH 05/23] Running tests again --- .../composite-actions/build-modified-postgres/action.yml | 9 ++++++++- .github/workflows/major-version-upgrade.yml | 4 ++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/composite-actions/build-modified-postgres/action.yml b/.github/composite-actions/build-modified-postgres/action.yml index 3beb14a4580..fa77eb2be59 100644 --- a/.github/composite-actions/build-modified-postgres/action.yml +++ b/.github/composite-actions/build-modified-postgres/action.yml @@ -70,13 +70,20 @@ runs: ${{ env.CCACHE_KEY }} - name: Save cache if cache hit fails in pull requests - if: ${{ github.event_name == 'pull_request' }} && steps.restore-ccache.outputs.cache-matched-key == '' + if: ${{ github.event_name == 'pull_request' }} && steps.restore-ccache.outcome == 'success' && steps.restore-ccache.outputs.cache-matched-key == '' run: | echo "SAVE_CCACHE=1" >> $GITHUB_ENV shell: bash + - name: Save cache if cache hit fails in pull requests + if: steps.restore-ccache.outputs.cache-matched-key != '' + run: | + echo "SAVE_CCACHE=" >> $GITHUB_ENV + shell: bash + - name: Build and Install the Modified PostgreSQL Instance and Run Tests run: | + echo "Cache matched key: '${{ steps.restore-ccache.outputs.cache-matched-key }}'" cd .. cd postgresql_modified_for_babelfish if [[ ${{inputs.tap_tests}} == "yes" ]]; then diff --git a/.github/workflows/major-version-upgrade.yml b/.github/workflows/major-version-upgrade.yml index bf0365f49d1..7dd3f2dfcb6 100644 --- a/.github/workflows/major-version-upgrade.yml +++ b/.github/workflows/major-version-upgrade.yml @@ -169,6 +169,10 @@ jobs: uses: ./.github/composite-actions/build-postgis-extension with: install_dir: ${{env.NEW_INSTALL_DIR}} + + - name: Save cache + if: always() && steps.build-postgis-extension.outcome == 'success' + uses: ./.github/composite-actions/save-ccache - name: Setup new data directory id: setup-new-datadir From adfddb371063aca54ed2a050e903d80c03d9501b Mon Sep 17 00:00:00 2001 From: SiddharthBITS Date: Thu, 16 Jan 2025 12:58:03 +0000 Subject: [PATCH 06/23] Running tests again --- .github/composite-actions/build-modified-postgres/action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/composite-actions/build-modified-postgres/action.yml b/.github/composite-actions/build-modified-postgres/action.yml index fa77eb2be59..ecd25d8c5fd 100644 --- a/.github/composite-actions/build-modified-postgres/action.yml +++ b/.github/composite-actions/build-modified-postgres/action.yml @@ -70,13 +70,13 @@ runs: ${{ env.CCACHE_KEY }} - name: Save cache if cache hit fails in pull requests - if: ${{ github.event_name == 'pull_request' }} && steps.restore-ccache.outcome == 'success' && steps.restore-ccache.outputs.cache-matched-key == '' + if: ${{ github.event_name == 'pull_request' }} && steps.restore-ccache.outcome == 'success' && ${{ steps.restore-ccache.outputs.cache-matched-key == '' }} run: | echo "SAVE_CCACHE=1" >> $GITHUB_ENV shell: bash - name: Save cache if cache hit fails in pull requests - if: steps.restore-ccache.outputs.cache-matched-key != '' + if: ${{ steps.restore-ccache.outputs.cache-matched-key != '' }} run: | echo "SAVE_CCACHE=" >> $GITHUB_ENV shell: bash From f48e1b0b9dcc2ac16a027508430e6e43ba1e9731 Mon Sep 17 00:00:00 2001 From: SiddharthBITS Date: Thu, 16 Jan 2025 13:14:31 +0000 Subject: [PATCH 07/23] Running tests again --- .../build-modified-postgres/action.yml | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/.github/composite-actions/build-modified-postgres/action.yml b/.github/composite-actions/build-modified-postgres/action.yml index ecd25d8c5fd..7f499804782 100644 --- a/.github/composite-actions/build-modified-postgres/action.yml +++ b/.github/composite-actions/build-modified-postgres/action.yml @@ -65,22 +65,16 @@ runs: path: ~/.ccache key: - ${{ env.CCACHE_KEY }} + random-random restore-keys: ${{ env.CCACHE_KEY }} - name: Save cache if cache hit fails in pull requests - if: ${{ github.event_name == 'pull_request' }} && steps.restore-ccache.outcome == 'success' && ${{ steps.restore-ccache.outputs.cache-matched-key == '' }} + if: ${{ github.event_name == 'pull_request' }} && steps.restore-ccache.outputs.cache-matched-key != ${{ env.CCACHE_KEY }} run: | echo "SAVE_CCACHE=1" >> $GITHUB_ENV shell: bash - - name: Save cache if cache hit fails in pull requests - if: ${{ steps.restore-ccache.outputs.cache-matched-key != '' }} - run: | - echo "SAVE_CCACHE=" >> $GITHUB_ENV - shell: bash - - name: Build and Install the Modified PostgreSQL Instance and Run Tests run: | echo "Cache matched key: '${{ steps.restore-ccache.outputs.cache-matched-key }}'" From ad3689667a8a9875e98263d3fa7b50e41a749367 Mon Sep 17 00:00:00 2001 From: SiddharthBITS Date: Thu, 16 Jan 2025 13:26:27 +0000 Subject: [PATCH 08/23] Trusting bash more than github --- .../build-modified-postgres/action.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/composite-actions/build-modified-postgres/action.yml b/.github/composite-actions/build-modified-postgres/action.yml index 7f499804782..8b3a5010d33 100644 --- a/.github/composite-actions/build-modified-postgres/action.yml +++ b/.github/composite-actions/build-modified-postgres/action.yml @@ -70,14 +70,18 @@ runs: ${{ env.CCACHE_KEY }} - name: Save cache if cache hit fails in pull requests - if: ${{ github.event_name == 'pull_request' }} && steps.restore-ccache.outputs.cache-matched-key != ${{ env.CCACHE_KEY }} + if: ${{ github.event_name == 'pull_request' }} run: | - echo "SAVE_CCACHE=1" >> $GITHUB_ENV + if [[ ${{ steps.restore-ccache.outputs.cache-matched-key }} == '' ]]; then + echo "SAVE_CCACHE=1" >> $GITHUB_ENV + elif [[ ${{ steps.restore-ccache.outputs.cache-matched-key }} != '' ]]; then + echo "SAVE_CCACHE=" >> $GITHUB_ENV + fi shell: bash - name: Build and Install the Modified PostgreSQL Instance and Run Tests run: | - echo "Cache matched key: '${{ steps.restore-ccache.outputs.cache-matched-key }}'" + echo "'${{ steps.restore-ccache.outputs.cache-matched-key }}'" cd .. cd postgresql_modified_for_babelfish if [[ ${{inputs.tap_tests}} == "yes" ]]; then From 06d0f9f0cdf85a2c20d6b9250292aa625f9fccbf Mon Sep 17 00:00:00 2001 From: SiddharthBITS Date: Thu, 16 Jan 2025 13:35:20 +0000 Subject: [PATCH 09/23] Trusting bash more than github P2 --- .../composite-actions/build-modified-postgres/action.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/composite-actions/build-modified-postgres/action.yml b/.github/composite-actions/build-modified-postgres/action.yml index 8b3a5010d33..8d3c41ce31f 100644 --- a/.github/composite-actions/build-modified-postgres/action.yml +++ b/.github/composite-actions/build-modified-postgres/action.yml @@ -72,16 +72,17 @@ runs: - name: Save cache if cache hit fails in pull requests if: ${{ github.event_name == 'pull_request' }} run: | - if [[ ${{ steps.restore-ccache.outputs.cache-matched-key }} == '' ]]; then + if [[ '${{ steps.restore-ccache.outputs.cache-matched-key }}' == '' ]]; then echo "SAVE_CCACHE=1" >> $GITHUB_ENV - elif [[ ${{ steps.restore-ccache.outputs.cache-matched-key }} != '' ]]; then + elif [[ ${{ 'steps.restore-ccache.outputs.cache-matched-key' }} != '' ]]; then echo "SAVE_CCACHE=" >> $GITHUB_ENV fi shell: bash - name: Build and Install the Modified PostgreSQL Instance and Run Tests run: | - echo "'${{ steps.restore-ccache.outputs.cache-matched-key }}'" + echo $env.SAVE_CCACHE + echo "${{ steps.restore-ccache.outputs.cache-matched-key }}" cd .. cd postgresql_modified_for_babelfish if [[ ${{inputs.tap_tests}} == "yes" ]]; then From 3d4d66f1cf9415b01b8b361e9e3f137b51f75a73 Mon Sep 17 00:00:00 2001 From: SiddharthBITS Date: Thu, 16 Jan 2025 14:24:50 +0000 Subject: [PATCH 10/23] Adding tapTest and coverage key saves --- .../build-modified-postgres/action.yml | 12 ++++++------ .../composite-actions/save-ccache/action.yml | 6 +++--- .github/workflows/dotnet-tests.yml | 4 ++++ .github/workflows/tap-tests.yml | 17 +++++++++++++++-- 4 files changed, 28 insertions(+), 11 deletions(-) diff --git a/.github/composite-actions/build-modified-postgres/action.yml b/.github/composite-actions/build-modified-postgres/action.yml index 8d3c41ce31f..78083fb0cf5 100644 --- a/.github/composite-actions/build-modified-postgres/action.yml +++ b/.github/composite-actions/build-modified-postgres/action.yml @@ -48,26 +48,26 @@ runs: cd postgresql_modified_for_babelfish rm -rf ~/.ccache if [[ ${{inputs.tap_tests}} == "yes" ]]; then - echo "CCACHE_KEY=$(git rev-parse --short HEAD)-tapTest" >> $GITHUB_ENV + echo "CRESTORE_KEY=$(git rev-parse --short HEAD)-tapTest" >> $GITHUB_ENV elif [[ ${{inputs.code_coverage}} == "yes" ]]; then - echo "CCACHE_KEY=$(git rev-parse --short HEAD)-coverage" >> $GITHUB_ENV + echo "CRESTORE_KEY=$(git rev-parse --short HEAD)-coverage" >> $GITHUB_ENV elif [[ ${{inputs.release_mode}} == "yes" ]]; then - echo "CCACHE_KEY=$(git rev-parse --short HEAD)-release" >> $GITHUB_ENV + echo "CRESTORE_KEY=$(git rev-parse --short HEAD)-release" >> $GITHUB_ENV else - echo "CCACHE_KEY=$(git rev-parse --short HEAD)-default" >> $GITHUB_ENV + echo "CRESTORE_KEY=$(git rev-parse --short HEAD)-default" >> $GITHUB_ENV fi shell: bash - uses: actions/cache/restore@v4 id: restore-ccache - if: ${{ github.event_name == 'pull_request' }} + if: ${{ github.event_name == 'pull_request' }} || ${{ inputs.code_coverage == 'yes' }} with: path: ~/.ccache key: random-random restore-keys: - ${{ env.CCACHE_KEY }} + ${{ env.CRESTORE_KEY }} - name: Save cache if cache hit fails in pull requests if: ${{ github.event_name == 'pull_request' }} diff --git a/.github/composite-actions/save-ccache/action.yml b/.github/composite-actions/save-ccache/action.yml index fa76e7cc92b..572952deb46 100644 --- a/.github/composite-actions/save-ccache/action.yml +++ b/.github/composite-actions/save-ccache/action.yml @@ -2,16 +2,16 @@ name: 'Save Ccache on push' runs: using: "composite" - steps: + steps: - name: Setup new cache key if: always() run: | - echo "CCACHE_KEY=${{env.CCACHE_KEY}}-$(git rev-parse --short HEAD)" >> $GITHUB_ENV + echo "CCACHE_KEY=${{env.CRESTORE_KEY}}-$(git rev-parse --short HEAD)" >> $GITHUB_ENV shell: bash - uses: actions/cache/save@v4 - if: always() && ${{ env.CCACHE_KEY != '' && (github.event_name != 'pull_request' || env.SAVE_CCACHE == 1)}} + if: always() && ${{ env.CRESTORE_KEY != '' && (github.event_name != 'pull_request' || env.SAVE_CCACHE == 1)}} with: path: ~/.ccache diff --git a/.github/workflows/dotnet-tests.yml b/.github/workflows/dotnet-tests.yml index 32d3936118c..96c11c0a210 100644 --- a/.github/workflows/dotnet-tests.yml +++ b/.github/workflows/dotnet-tests.yml @@ -40,6 +40,10 @@ jobs: id: install-extensions if: always() && steps.build-postgis-extension.outcome == 'success' uses: ./.github/composite-actions/install-extensions + + - name: Save cache + if: always() && steps.install-extensions.outcome == 'success' + uses: ./.github/composite-actions/save-ccache - name: Run Dotnet Tests id: run-dotnet-tests diff --git a/.github/workflows/tap-tests.yml b/.github/workflows/tap-tests.yml index e0bc7704dc8..586b24acd8f 100644 --- a/.github/workflows/tap-tests.yml +++ b/.github/workflows/tap-tests.yml @@ -45,7 +45,8 @@ jobs: with: engine_branch: ${{env.ENGINE_BRANCH_16}} install_dir: ${{env.INSTALL_DIR_16}} - + + - name: Build Modified Postgres using ${{env.ENGINE_BRANCH_OLD}} id: build-modified-postgres-old if: always() && steps.build-modified-postgres-16.outcome == 'success' @@ -100,6 +101,8 @@ jobs: sudo make USE_PGXS=1 PG_CONFIG=~/psql_source/bin/pg_config install shell: bash + + - name: Build Extensions using ${{env.EXTENSION_BRANCH_OLD}} id: build-extensions-old if: always() && steps.build-postgis-extension-old.outcome == 'success' @@ -107,9 +110,13 @@ jobs: with: install_dir: ${{env.OLD_INSTALL_DIR}} extension_branch: ${{env.EXTENSION_BRANCH_OLD}} + + - name: Save cache + if: always() && steps.build-extensions-old.outcome == 'success' + uses: ./.github/composite-actions/save-ccache - uses: actions/checkout@v2 - + - name: Build Modified Postgres using latest version id: build-modified-postgres-new if: always() && steps.build-extensions-old.outcome == 'success' @@ -117,6 +124,8 @@ jobs: with: tap_tests: 'yes' install_dir: ${{env.NEW_INSTALL_DIR}} + + - name: Compile new ANTLR id: compile-new-antlr @@ -139,6 +148,10 @@ jobs: with: install_dir: ${{env.NEW_INSTALL_DIR}} + - name: Save cache + if: always() && steps.build-extensions-old.outcome == 'success' + uses: ./.github/composite-actions/save-ccache + - name: Run TAP Tests id: tap if: always() && steps.build-postgis-extension.outcome == 'success' From 15e6d14613d8bc285fe80268e1e03f2b0a58993a Mon Sep 17 00:00:00 2001 From: SiddharthBITS Date: Thu, 16 Jan 2025 14:57:20 +0000 Subject: [PATCH 11/23] Fixing saving caches in tapTests and adding ccache as prefix --- .../composite-actions/build-modified-postgres/action.yml | 4 ++-- .github/composite-actions/save-ccache/action.yml | 4 ++-- .github/workflows/tap-tests.yml | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/composite-actions/build-modified-postgres/action.yml b/.github/composite-actions/build-modified-postgres/action.yml index 78083fb0cf5..b714530362b 100644 --- a/.github/composite-actions/build-modified-postgres/action.yml +++ b/.github/composite-actions/build-modified-postgres/action.yml @@ -67,7 +67,7 @@ runs: key: random-random restore-keys: - ${{ env.CRESTORE_KEY }} + ccache-${{ env.CRESTORE_KEY }} - name: Save cache if cache hit fails in pull requests if: ${{ github.event_name == 'pull_request' }} @@ -81,7 +81,7 @@ runs: - name: Build and Install the Modified PostgreSQL Instance and Run Tests run: | - echo $env.SAVE_CCACHE + echo "${{env.SAVE_CCACHE}}" echo "${{ steps.restore-ccache.outputs.cache-matched-key }}" cd .. cd postgresql_modified_for_babelfish diff --git a/.github/composite-actions/save-ccache/action.yml b/.github/composite-actions/save-ccache/action.yml index 572952deb46..91108171782 100644 --- a/.github/composite-actions/save-ccache/action.yml +++ b/.github/composite-actions/save-ccache/action.yml @@ -1,4 +1,4 @@ -name: 'Save Ccache on push' +name: 'Save ccache on push' runs: using: "composite" @@ -16,7 +16,7 @@ runs: path: ~/.ccache key: - ${{ env.CCACHE_KEY }} + ccache-${{ env.CCACHE_KEY }} - name: Clean ccache directory and unset env variables if: always() diff --git a/.github/workflows/tap-tests.yml b/.github/workflows/tap-tests.yml index 586b24acd8f..c4b024af1c3 100644 --- a/.github/workflows/tap-tests.yml +++ b/.github/workflows/tap-tests.yml @@ -110,12 +110,12 @@ jobs: with: install_dir: ${{env.OLD_INSTALL_DIR}} extension_branch: ${{env.EXTENSION_BRANCH_OLD}} - + + - uses: actions/checkout@v2 + - name: Save cache if: always() && steps.build-extensions-old.outcome == 'success' uses: ./.github/composite-actions/save-ccache - - - uses: actions/checkout@v2 - name: Build Modified Postgres using latest version id: build-modified-postgres-new From f9fd06b351254ffb7e62fcda6758c5ff065a63df Mon Sep 17 00:00:00 2001 From: SiddharthBITS Date: Thu, 16 Jan 2025 16:05:47 +0000 Subject: [PATCH 12/23] Upgrading actions/download-artifact to v4 --- .github/workflows/pr-code-coverage.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pr-code-coverage.yml b/.github/workflows/pr-code-coverage.yml index 476c2d7eb44..886e29c3a18 100644 --- a/.github/workflows/pr-code-coverage.yml +++ b/.github/workflows/pr-code-coverage.yml @@ -37,31 +37,31 @@ jobs: run: | sudo apt-get install lcov - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 id: download-jdbc-coverage with: name:  coverage-babelfish-extensions-jdbc path: contrib/ - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 id: download-dotnet-coverage with: name: coverage-babelfish-extensions-dotnet path: contrib/ - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 id: download-odbc-coverage with: name: coverage-babelfish-extensions-odbc path: contrib/ - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 id: download-python-coverage with: name: coverage-babelfish-extensions-python path: contrib/ - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 id: download-isolation-coverage with: name: coverage-babelfish-extensions-isolation From 54c0428f22dc98c55a74b1baee40e52311aa4dbc Mon Sep 17 00:00:00 2001 From: SiddharthBITS Date: Thu, 16 Jan 2025 19:33:59 +0000 Subject: [PATCH 13/23] Test run --- .github/composite-actions/upload-coredump/action.yml | 2 +- .github/workflows/dotnet-tests.yml | 2 +- .github/workflows/isolation-tests.yml | 2 +- .github/workflows/jdbc-tests.yml | 2 +- .github/workflows/odbc-tests.yml | 2 +- .github/workflows/python-tests.yml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/composite-actions/upload-coredump/action.yml b/.github/composite-actions/upload-coredump/action.yml index d7540cce7a9..04fd12f12d4 100644 --- a/.github/composite-actions/upload-coredump/action.yml +++ b/.github/composite-actions/upload-coredump/action.yml @@ -14,7 +14,7 @@ runs: - name: Upload Coredumps - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: always() with: name: coredumps diff --git a/.github/workflows/dotnet-tests.yml b/.github/workflows/dotnet-tests.yml index 96c11c0a210..476d6e1f626 100644 --- a/.github/workflows/dotnet-tests.yml +++ b/.github/workflows/dotnet-tests.yml @@ -76,7 +76,7 @@ jobs: - name: Upload Coverage Report for Babelfish Extensions if: always() && steps.code-coverage-summary.outcome == 'success' - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: coverage-babelfish-extensions-dotnet path: contrib/dotnet-lcov.info diff --git a/.github/workflows/isolation-tests.yml b/.github/workflows/isolation-tests.yml index af8c7d3916a..024cbc03b4b 100644 --- a/.github/workflows/isolation-tests.yml +++ b/.github/workflows/isolation-tests.yml @@ -105,7 +105,7 @@ jobs: - name: Upload Coverage Report for Babelfish Extensions if: always() && steps.code-coverage-summary.outcome == 'success' - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: coverage-babelfish-extensions-isolation path: contrib/isolation-lcov.info diff --git a/.github/workflows/jdbc-tests.yml b/.github/workflows/jdbc-tests.yml index 77e71dd0cbe..26b5b1b3c4d 100644 --- a/.github/workflows/jdbc-tests.yml +++ b/.github/workflows/jdbc-tests.yml @@ -167,7 +167,7 @@ jobs: - name: Upload Coverage Report for Babelfish Extensions if: always() && steps.code-coverage-summary.outcome == 'success' - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: coverage-babelfish-extensions-jdbc path: contrib/jdbc-lcov.info diff --git a/.github/workflows/odbc-tests.yml b/.github/workflows/odbc-tests.yml index 83da6ec34b8..89996b6f2b2 100644 --- a/.github/workflows/odbc-tests.yml +++ b/.github/workflows/odbc-tests.yml @@ -72,7 +72,7 @@ jobs: - name: Upload Coverage Report for Babelfish Extensions if: always() && steps.code-coverage-summary.outcome == 'success' - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: coverage-babelfish-extensions-odbc path: contrib/odbc-lcov.info diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml index f9e1c8d5cd4..63f8efa8095 100644 --- a/.github/workflows/python-tests.yml +++ b/.github/workflows/python-tests.yml @@ -72,7 +72,7 @@ jobs: - name: Upload Coverage Report for Babelfish Extensions if: always() && steps.code-coverage-summary.outcome == 'success' - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: coverage-babelfish-extensions-python path: contrib/python-lcov.info From 5396fc0700478d55a22346c210605d1a7d7379bd Mon Sep 17 00:00:00 2001 From: SiddharthBITS Date: Thu, 16 Jan 2025 20:28:46 +0000 Subject: [PATCH 14/23] Final changes V1 --- .../composite-actions/install-dependencies/action.yml | 1 - .github/composite-actions/save-ccache/action.yml | 5 +++-- .github/workflows/code-coverage.yml | 10 +++++----- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/composite-actions/install-dependencies/action.yml b/.github/composite-actions/install-dependencies/action.yml index 5a271c5e7f5..8f32d6f0d5c 100644 --- a/.github/composite-actions/install-dependencies/action.yml +++ b/.github/composite-actions/install-dependencies/action.yml @@ -15,5 +15,4 @@ runs: sudo /usr/sbin/update-ccache-symlinks echo 'export PATH="/usr/lib/ccache:$PATH"' | tee -a ~/.bashrc source ~/.bashrc && echo $PATH - echo "NOW=$(date +'%Y-%m-%dT%H:%M:%S')" >> $GITHUB_ENV shell: bash diff --git a/.github/composite-actions/save-ccache/action.yml b/.github/composite-actions/save-ccache/action.yml index 91108171782..05c108c4747 100644 --- a/.github/composite-actions/save-ccache/action.yml +++ b/.github/composite-actions/save-ccache/action.yml @@ -10,8 +10,9 @@ runs: echo "CCACHE_KEY=${{env.CRESTORE_KEY}}-$(git rev-parse --short HEAD)" >> $GITHUB_ENV shell: bash - - uses: actions/cache/save@v4 - if: always() && ${{ env.CRESTORE_KEY != '' && (github.event_name != 'pull_request' || env.SAVE_CCACHE == 1)}} + - name: Save ccache + uses: actions/cache/save@v4 + if: always() && ${{ github.event_name != 'pull_request' || env.SAVE_CCACHE == 1 }} with: path: ~/.ccache diff --git a/.github/workflows/code-coverage.yml b/.github/workflows/code-coverage.yml index 8d8c4f1edae..c039fb6b2e5 100644 --- a/.github/workflows/code-coverage.yml +++ b/.github/workflows/code-coverage.yml @@ -119,28 +119,28 @@ jobs: lcov --list lcov.info - name: Upload Coverage Report for babelfishpg_tsql extension if: always() - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: coverage_tsql_${{github.ref_name}} path: contrib/babelfishpg_tsql/coverage/ - name: Upload Coverage Report for babelfishpg_tds extension if: always() - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: coverage_tds_${{github.ref_name}} path: contrib/babelfishpg_tds/coverage/ - name: Upload Coverage Report for babelfishpg_common extension if: always() - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: coverage_common_${{github.ref_name}} path: contrib/babelfishpg_common/coverage/ - name: Upload Coverage Report for babelfishpg_money extension if: always() - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: coverage_money_${{github.ref_name}} path: contrib/babelfishpg_money/coverage/ @@ -163,7 +163,7 @@ jobs: - name: Upload CSV report with latest coverage numbers if: (github.event_name == 'schedule') - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: csv_${{github.ref_name}} path: contrib/${{github.ref_name}}.csv From 1d855566da2d54080f386f0762dc3ef2b5fbd83c Mon Sep 17 00:00:00 2001 From: SiddharthBITS Date: Thu, 16 Jan 2025 20:42:23 +0000 Subject: [PATCH 15/23] Final Changes V2 Turning JDBC Tests ON --- test/JDBC/jdbc_schedule | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/JDBC/jdbc_schedule b/test/JDBC/jdbc_schedule index b2618fad775..79ebd44a958 100644 --- a/test/JDBC/jdbc_schedule +++ b/test/JDBC/jdbc_schedule @@ -8,7 +8,7 @@ # new line # 6. If you want the framework to not run certain files, use: ignore#!# -#all +all # BABEL-SP_FKEYS test is very slow and causing github action timeout. From 9083d89408b04f75c23d0b59581d7e380736d285 Mon Sep 17 00:00:00 2001 From: SiddharthBITS Date: Fri, 17 Jan 2025 04:00:28 +0000 Subject: [PATCH 16/23] Disabling JDBC Tests and runnning again --- test/JDBC/jdbc_schedule | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/JDBC/jdbc_schedule b/test/JDBC/jdbc_schedule index 79ebd44a958..b2618fad775 100644 --- a/test/JDBC/jdbc_schedule +++ b/test/JDBC/jdbc_schedule @@ -8,7 +8,7 @@ # new line # 6. If you want the framework to not run certain files, use: ignore#!# -all +#all # BABEL-SP_FKEYS test is very slow and causing github action timeout. From 470249dc11faa97870007c929ad8e1072980c33b Mon Sep 17 00:00:00 2001 From: SiddharthBITS Date: Fri, 17 Jan 2025 04:17:42 +0000 Subject: [PATCH 17/23] Debugging extra cache being created --- .github/composite-actions/save-ccache/action.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/composite-actions/save-ccache/action.yml b/.github/composite-actions/save-ccache/action.yml index 05c108c4747..b047304adc7 100644 --- a/.github/composite-actions/save-ccache/action.yml +++ b/.github/composite-actions/save-ccache/action.yml @@ -8,6 +8,13 @@ runs: if: always() run: | echo "CCACHE_KEY=${{env.CRESTORE_KEY}}-$(git rev-parse --short HEAD)" >> $GITHUB_ENV + echo "Event : ${{ github.event_name }}" + echo "Save ccache : ${{ env.SAVE_CCACHE }}" + if [[ ${{ github.event_name != 'pull_request' || env.SAVE_CCACHE == 1 }} == true ]]; then + echo "Cache to be Saved" + else + echo "Cache shouldn't be Saved" + fi shell: bash - name: Save ccache From 2a19dfe9536bca76594608a31c4d2e20065964de Mon Sep 17 00:00:00 2001 From: SiddharthBITS Date: Fri, 17 Jan 2025 04:36:49 +0000 Subject: [PATCH 18/23] Debugging extra cache being created V2 --- .github/composite-actions/save-ccache/action.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/composite-actions/save-ccache/action.yml b/.github/composite-actions/save-ccache/action.yml index b047304adc7..33502e35b5c 100644 --- a/.github/composite-actions/save-ccache/action.yml +++ b/.github/composite-actions/save-ccache/action.yml @@ -12,14 +12,16 @@ runs: echo "Save ccache : ${{ env.SAVE_CCACHE }}" if [[ ${{ github.event_name != 'pull_request' || env.SAVE_CCACHE == 1 }} == true ]]; then echo "Cache to be Saved" + echo "SAVE_CACHE_HERE='true'" >> $GITHUB_ENV else echo "Cache shouldn't be Saved" + echo "SAVE_CACHE_HERE='false" >> $GITHUB_ENV fi shell: bash - name: Save ccache uses: actions/cache/save@v4 - if: always() && ${{ github.event_name != 'pull_request' || env.SAVE_CCACHE == 1 }} + if: always() && ${{ env.SAVE_CACHE_HERE }} == 'true' with: path: ~/.ccache @@ -32,4 +34,5 @@ runs: run: | rm -rf ~/.ccache echo "CCACHE_KEY=" >> $GITHUB_ENV - echo "SAVE_CCACHE=" >> $GITHUB_ENV \ No newline at end of file + echo "SAVE_CCACHE=" >> $GITHUB_ENV + echo "SAVE_CACHE_HERE=" >> $GITHUB_ENV \ No newline at end of file From b062cdcd1b68cdc79f92e83b112dc2fcc44dd407 Mon Sep 17 00:00:00 2001 From: SiddharthBITS Date: Fri, 17 Jan 2025 04:44:24 +0000 Subject: [PATCH 19/23] Debugging extra cache being created V3 --- .github/composite-actions/save-ccache/action.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/composite-actions/save-ccache/action.yml b/.github/composite-actions/save-ccache/action.yml index 33502e35b5c..10f989d33b1 100644 --- a/.github/composite-actions/save-ccache/action.yml +++ b/.github/composite-actions/save-ccache/action.yml @@ -12,16 +12,16 @@ runs: echo "Save ccache : ${{ env.SAVE_CCACHE }}" if [[ ${{ github.event_name != 'pull_request' || env.SAVE_CCACHE == 1 }} == true ]]; then echo "Cache to be Saved" - echo "SAVE_CACHE_HERE='true'" >> $GITHUB_ENV + echo "SAVE_CACHE_HERE=1" >> $GITHUB_ENV else echo "Cache shouldn't be Saved" - echo "SAVE_CACHE_HERE='false" >> $GITHUB_ENV + echo "SAVE_CACHE_HERE=0" >> $GITHUB_ENV fi shell: bash - name: Save ccache uses: actions/cache/save@v4 - if: always() && ${{ env.SAVE_CACHE_HERE }} == 'true' + if: always() && ${{ env.SAVE_CACHE_HERE }} == 1 with: path: ~/.ccache From bfffc5e254e1c082f704f3dd04cda848086cc3ac Mon Sep 17 00:00:00 2001 From: SiddharthBITS Date: Fri, 17 Jan 2025 04:51:02 +0000 Subject: [PATCH 20/23] Debugging extra cache being created V4 --- .github/composite-actions/save-ccache/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/composite-actions/save-ccache/action.yml b/.github/composite-actions/save-ccache/action.yml index 10f989d33b1..10d6402528b 100644 --- a/.github/composite-actions/save-ccache/action.yml +++ b/.github/composite-actions/save-ccache/action.yml @@ -21,7 +21,7 @@ runs: - name: Save ccache uses: actions/cache/save@v4 - if: always() && ${{ env.SAVE_CACHE_HERE }} == 1 + if: always() && ${{ env.SAVE_CACHE_HERE == 1}} with: path: ~/.ccache From 0c5ba4dd5245945856e543826b0d572ac1afdc55 Mon Sep 17 00:00:00 2001 From: SiddharthBITS Date: Fri, 17 Jan 2025 05:01:22 +0000 Subject: [PATCH 21/23] Debugging extra cache being created V5 --- .github/composite-actions/save-ccache/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/composite-actions/save-ccache/action.yml b/.github/composite-actions/save-ccache/action.yml index 10d6402528b..30eed755c64 100644 --- a/.github/composite-actions/save-ccache/action.yml +++ b/.github/composite-actions/save-ccache/action.yml @@ -21,7 +21,7 @@ runs: - name: Save ccache uses: actions/cache/save@v4 - if: always() && ${{ env.SAVE_CACHE_HERE == 1}} + if: env.SAVE_CACHE_HERE == 1 with: path: ~/.ccache From 9bdae3cfd6b8da6f3d77e61e71aa9a8d5f72413f Mon Sep 17 00:00:00 2001 From: SiddharthBITS Date: Fri, 17 Jan 2025 06:23:51 +0000 Subject: [PATCH 22/23] Clearing CRESTORE_KEY after save --- .github/composite-actions/build-modified-postgres/action.yml | 2 +- .github/composite-actions/save-ccache/action.yml | 3 ++- test/JDBC/jdbc_schedule | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/composite-actions/build-modified-postgres/action.yml b/.github/composite-actions/build-modified-postgres/action.yml index b714530362b..26ac521394d 100644 --- a/.github/composite-actions/build-modified-postgres/action.yml +++ b/.github/composite-actions/build-modified-postgres/action.yml @@ -24,7 +24,7 @@ inputs: runs: using: "composite" steps: - - name: Remake engine repository + - name: Checkout Modified PostgreSQL for Babelfish run: | cd .. rm -rf postgresql_modified_for_babelfish diff --git a/.github/composite-actions/save-ccache/action.yml b/.github/composite-actions/save-ccache/action.yml index 30eed755c64..2409fbc9036 100644 --- a/.github/composite-actions/save-ccache/action.yml +++ b/.github/composite-actions/save-ccache/action.yml @@ -35,4 +35,5 @@ runs: rm -rf ~/.ccache echo "CCACHE_KEY=" >> $GITHUB_ENV echo "SAVE_CCACHE=" >> $GITHUB_ENV - echo "SAVE_CACHE_HERE=" >> $GITHUB_ENV \ No newline at end of file + echo "SAVE_CACHE_HERE=" >> $GITHUB_ENV + echo "CRESTORE_KEY=" >> $GITHUB_ENV \ No newline at end of file diff --git a/test/JDBC/jdbc_schedule b/test/JDBC/jdbc_schedule index b2618fad775..79ebd44a958 100644 --- a/test/JDBC/jdbc_schedule +++ b/test/JDBC/jdbc_schedule @@ -8,7 +8,7 @@ # new line # 6. If you want the framework to not run certain files, use: ignore#!# -#all +all # BABEL-SP_FKEYS test is very slow and causing github action timeout. From dc24d8f50bb6b95eb238dff5b75987c7695f1ddb Mon Sep 17 00:00:00 2001 From: SiddharthBITS Date: Fri, 17 Jan 2025 14:19:12 +0000 Subject: [PATCH 23/23] Signed-off-by: SiddharthBITS Sign off