Skip to content

Commit

Permalink
[OSS-ONLY] Updated the ubuntu version to ubuntu-latest and updated th…
Browse files Browse the repository at this point in the history
…e repo config

Signed-off-by: Rishabh Tanwar <[email protected]>
  • Loading branch information
ritanwar committed Mar 4, 2025
1 parent 72498fa commit fb35931
Show file tree
Hide file tree
Showing 36 changed files with 83 additions and 49 deletions.
10 changes: 10 additions & 0 deletions .github/composite-actions/build-extensions/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ inputs:
description: 'Extension Branch name which needs to checkout first'
required: no
default: 'not_specified'
engine_version:
description: 'Engine version'
required: no
default: 'target.latest'

runs:
using: "composite"
Expand Down Expand Up @@ -37,6 +41,12 @@ runs:
cd ../babelfishpg_tds
make -j 4 && make install
cd ../babelfishpg_tsql
if [[ "$engine_version" != 'source.latest' && "$engine_version" != 'target.latest' && "$engine_version" -lt 15.13 ]]
then
export PG_CFLAGS='-fcommon -Wno-misleading-indentation'
fi
PG_CPPFLAGS='-I/usr/include -DENABLE_TDS_LIB -DENABLE_SPATIAL_TYPES' SHLIB_LINK='-lsybdb -L/usr/lib64' make
PG_CPPFLAGS='-I/usr/include -DENABLE_TDS_LIB -DENABLE_SPATIAL_TYPES' SHLIB_LINK='-lsybdb -L/usr/lib64' make install
shell: bash
5 changes: 5 additions & 0 deletions .github/composite-actions/dump-restore-util/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ inputs:
description: "Dump type full or combination of schema-only and data-only"
required: false
default: 'full'
engine_version:
description: 'Engine version'
required: no
default: 'target.latest'

runs:
using: "composite"
Expand All @@ -45,6 +49,7 @@ runs:
engine_branch: ${{ inputs.engine_branch }}
extension_branch: ${{ inputs.extension_branch }}
pg_new_dir: ${{ inputs.pg_new_dir }}
engine_version: ${{ inputs.engine_version }}

- name: Build latest dump/restore utilities
id: build-dump-utils
Expand Down
8 changes: 4 additions & 4 deletions .github/composite-actions/install-and-run-dotnet/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ runs:
- name: Install MSSQL Tools
id: install-mssql-tools
run: |
curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
curl https://packages.microsoft.com/config/ubuntu/20.04/prod.list | sudo tee /etc/apt/sources.list.d/msprod.list
curl https://packages.microsoft.com/keys/microsoft.asc | sudo tee /etc/apt/trusted.gpg.d/microsoft.asc
curl https://packages.microsoft.com/config/ubuntu/22.04/prod.list | sudo tee /etc/apt/sources.list.d/mssql-release.list
sudo apt-get update
sudo apt-get install mssql-tools unixodbc-dev
sudo apt-get install mssql-tools18 unixodbc-dev
echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bashrc
source ~/.bashrc
shell: bash
Expand All @@ -20,7 +20,7 @@ runs:
if: always() && steps.install-mssql-tools.outcome == 'success'
run: |
cd ~
wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
wget https://packages.microsoft.com/config/ubuntu/22.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
rm packages-microsoft-prod.deb
sudo apt-get install -y apt-transport-https
Expand Down
4 changes: 2 additions & 2 deletions .github/composite-actions/install-and-run-python/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ runs:
id: install-python
uses: actions/setup-python@v2
with:
python-version: 3.7
python-version: 'v3.10'

- name: Configure Python Environment
id: configure-python-environment
if: always() && steps.install-python.outcome == 'success'
run: |
cd ~
curl https://packages.microsoft.com/config/ubuntu/20.04/prod.list | sudo tee /etc/apt/sources.list.d/mssql-release.list
curl https://packages.microsoft.com/config/ubuntu/22.04/prod.list | sudo tee /etc/apt/sources.list.d/mssql-release.list
cd ~/work/babelfish_extensions/babelfish_extensions/test/python
mkdir sqltoolsservice
cd sqltoolsservice
Expand Down
3 changes: 1 addition & 2 deletions .github/composite-actions/install-dependencies/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@ runs:
steps:
- name: Install Dependencies
run: |
$GITHUB_WORKSPACE/.github/scripts/choose_install_mirror
sudo apt clean && sudo apt-get update --fix-missing -y
curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
curl https://packages.microsoft.com/config/ubuntu/20.04/prod.list | sudo tee /etc/apt/sources.list.d/msprod.list
curl https://packages.microsoft.com/config/ubuntu/22.04/prod.list | sudo tee /etc/apt/sources.list.d/msprod.list
sudo apt-get update --fix-missing -y
sudo apt-get install uuid-dev openjdk-8-jre libicu-dev libxml2-dev openssl libssl-dev python3-dev libossp-uuid-dev libpq-dev cmake pkg-config g++ build-essential bison mssql-tools unixodbc-dev libsybdb5 freetds-dev freetds-common gdal-bin libgdal-dev libgeos-dev gdb libkrb5-dev
sudo apt install -y ccache
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ inputs:
description: "Server collation name"
required: false
default: "default"
engine_version:
description: 'Engine version'
required: no
default: 'target.latest'

runs:
using: "composite"
Expand All @@ -34,6 +38,7 @@ runs:
engine_branch: ${{ inputs.engine_branch }}
extension_branch: ${{ inputs.extension_branch }}
pg_new_dir: ${{ inputs.pg_new_dir }}
engine_version: ${{ inputs.engine_version }}

- name: Run pg_upgrade
id: run-pg_upgrade
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ inputs:
description: "Server collation name"
required: false
default: "default"
engine_version:
description: 'Engine version'
required: no
default: 'target.latest'

runs:
using: "composite"
Expand All @@ -32,6 +36,7 @@ runs:
with:
install_dir: ${{ inputs.install_dir }}
extension_branch: ${{ inputs.extension_branch }}
engine_version: ${{ inputs.engine_version }}

# 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
Expand Down
7 changes: 6 additions & 1 deletion .github/composite-actions/setup-base-version/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ inputs:
description: "Whether it is version upgrade or dump/restore"
required: false
default: 'false'
engine_version:
description: 'Engine version'
required: no
default: 'target.latest'

runs:
using: "composite"
Expand Down Expand Up @@ -50,6 +54,7 @@ runs:
with:
install_dir: ${{ inputs.install_dir }}
extension_branch: ${{ inputs.extension_branch }}
engine_version: ${{ inputs.engine_version }}

- name: Build tds_fdw Extension
run: |
Expand Down Expand Up @@ -221,7 +226,7 @@ runs:
if: ${{ matrix.upgrade-path.path[0] == 'source_latest' && steps.jdbc-upgrade-tests.outcome == 'success' }}
uses: actions/setup-python@v2
with:
python-version: 3.7
python-version: 'v3.10'

- name: Configure Python Environment
id: configure-python-environment
Expand Down
2 changes: 1 addition & 1 deletion .github/composite-actions/setup-dump-restore-ca/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ runs:
type_var=".\"dump-restore-version\"[${{ matrix.upgrade-path.id }}][$i].\"type\""
type=$(yq $type_var ${{ github.workspace }}/.github/configuration/dump-restore-test-configuration.yml)
printf " - name: Dump and Restore to version $dump_restore_version\n id: dump-restore-version-$i\n if: always() $temp\n uses: ${uses_file}\n with: \n engine_branch: ${engine_branch}\n extension_branch: ${extension_branch}\n is_final_ver: ${is_final_ver}\n pg_old_dir: ${pg_old_dir}\n pg_new_dir: ${pg_new_dir}\n migration_mode: 'multi-db'\n database_level: ${database_level}\n dump_data_as: ${dump_data_as}\n dump_format: ${dump_format}\n type: ${type}\n\n" >> $dump_restore_version_dir_path/action.yml
printf " - name: Dump and Restore to version $dump_restore_version\n id: dump-restore-version-$i\n if: always() $temp\n uses: ${uses_file}\n with: \n engine_branch: ${engine_branch}\n extension_branch: ${extension_branch}\n is_final_ver: ${is_final_ver}\n pg_old_dir: ${pg_old_dir}\n pg_new_dir: ${pg_new_dir}\n migration_mode: 'multi-db'\n database_level: ${database_level}\n dump_data_as: ${dump_data_as}\n dump_format: ${dump_format}\n type: ${type}\n engine_version: ${dump_restore_version}\n\n" >> $dump_restore_version_dir_path/action.yml
previous_installed_version=$dump_restore_version
done
Expand Down
5 changes: 5 additions & 0 deletions .github/composite-actions/setup-new-version/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ inputs:
pg_new_dir:
description: "Install new version in this directory"
required: true
engine_version:
description: 'Engine version'
required: no
default: 'target.latest'

runs:
using: "composite"
Expand All @@ -34,6 +38,7 @@ runs:
with:
install_dir: ${{ inputs.pg_new_dir }}
extension_branch: ${{ inputs.extension_branch }}
engine_version: ${{ inputs.engine_version }}

- uses: actions/checkout@v2

Expand Down
4 changes: 2 additions & 2 deletions .github/composite-actions/setup-upgrade-version-ca/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ runs:
# Appending upgrade step in upgrade-version composite action based on upgrade type
if [[ $upgrade_type == 'major' ]]
then
printf " - name: Upgrade Version to $upgrade_version\n id: upgrade-version-$i\n if: always() $temp\n uses: ${uses_file}\n with: \n engine_branch: ${engine_branch}\n extension_branch: ${extension_branch}\n is_final_ver: ${is_final_ver}\n pg_old_dir: ${pg_old_dir}\n pg_new_dir: ${pg_new_dir}\n migration_mode: 'multi-db'\n server_collation_name: ${{ inputs.server_collation_name }}\n\n" >> $upgrade_version_dir_path/action.yml
printf " - name: Upgrade Version to $upgrade_version\n id: upgrade-version-$i\n if: always() $temp\n uses: ${uses_file}\n with: \n engine_branch: ${engine_branch}\n extension_branch: ${extension_branch}\n is_final_ver: ${is_final_ver}\n pg_old_dir: ${pg_old_dir}\n pg_new_dir: ${pg_new_dir}\n migration_mode: 'multi-db'\n server_collation_name: ${{ inputs.server_collation_name }}\n engine_version: ${upgrade_version}\n\n" >> $upgrade_version_dir_path/action.yml
else
printf " - name: Upgrade Version to $upgrade_version\n id: upgrade-version-$i\n if: always() $temp\n uses: ${uses_file}\n with: \n engine_branch: ${engine_branch}\n extension_branch: ${extension_branch}\n is_final_ver: ${is_final_ver}\n install_dir: ${pg_new_dir}\n server_collation_name: ${{ inputs.server_collation_name }}\n\n" >> $upgrade_version_dir_path/action.yml
printf " - name: Upgrade Version to $upgrade_version\n id: upgrade-version-$i\n if: always() $temp\n uses: ${uses_file}\n with: \n engine_branch: ${engine_branch}\n extension_branch: ${extension_branch}\n is_final_ver: ${is_final_ver}\n install_dir: ${pg_new_dir}\n server_collation_name: ${{ inputs.server_collation_name }}\n engine_version: ${upgrade_version}\n\n" >> $upgrade_version_dir_path/action.yml
fi
previous_installed_version=$upgrade_version
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/code-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:

jobs:
run-code-coverage-tests:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
env:
INSTALL_DIR: psql
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dotnet-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on: [workflow_call]

jobs:
run-babelfish-dotnet-tests:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
id: checkout
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/isolation-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on: [workflow_call]
jobs:
isolation-tests:
name: Isolation-Tests
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
id: checkout
Expand Down Expand Up @@ -45,12 +45,12 @@ jobs:
- name: Install Python
uses: actions/setup-python@v2
with:
python-version: 3.7
python-version: 'v3.10'

- name: Configure Python environment
run: |
cd ~
curl https://packages.microsoft.com/config/ubuntu/20.04/prod.list | sudo tee /etc/apt/sources.list.d/mssql-release.list
curl https://packages.microsoft.com/config/ubuntu/22.04/prod.list | sudo tee /etc/apt/sources.list.d/mssql-release.list
cd ~/work/babelfish_extensions/babelfish_extensions/test/python
sudo ACCEPT_EULA=Y apt-get install -y msodbcsql17 python3-dev
pip3 install pyodbc pymssql pytest pytest-xdist antlr4-python3-runtime==4.9.3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/jdbc-tests-pgaudit-enable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
run-babelfish-jdbc-tests-with-pg-audit:
env:
INSTALL_DIR: psql
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
id: checkout
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/jdbc-tests-single-db-mode.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ jobs:
run-babelfish-jdbc-tests:
env:
INSTALL_DIR: psql
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
id: checkout
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
INSTALL_DIR: psql
SERVER_COLLATION_NAME: chinese_prc_ci_as

runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
id: checkout
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/jdbc-tests-with-parallel-query.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ jobs:
run-babelfish-jdbc-tests-with-parallel-query-mode:
env:
INSTALL_DIR: psql
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
id: checkout
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/jdbc-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ jobs:
run-babelfish-jdbc-tests:
env:
INSTALL_DIR: psql
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
id: checkout
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/major-version-upgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
ENGINE_BRANCH_FROM: BABEL_2_X_DEV__PG_14_X
EXTENSION_BRANCH_FROM: BABEL_2_X_DEV

runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/manual_tags.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ on:

jobs:
create_tag:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v2
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/minor-version-upgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
INSTALL_DIR: psql

name: Build and test
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2

Expand Down Expand Up @@ -77,6 +77,8 @@ jobs:
id: build-extensions-older
if: always() && steps.build-postgis-extension-old.outcome == 'success'
uses: ./.github/composite-actions/build-extensions
with:
engine_version: 17.4

- name: Build tds_fdw Extension
id: build-tds_fdw-extension
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/odbc-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on: [workflow_call]

jobs:
run-babelfish-odbc-tests:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
id: checkout
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/pg_dump-restore-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on: [push, pull_request]
jobs:
generate-dump-restore-tests:
name: Generate Dump/Restore Tests
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
outputs:
dump-restore-path-list: ${{ steps.generate-dump-restore-path.outputs.dump-restore-path-list }}
steps:
Expand Down Expand Up @@ -32,7 +32,7 @@ jobs:
matrix:
upgrade-path: ${{ fromJson(needs.generate-dump-restore-tests.outputs.dump-restore-path-list) }}
name: Dump Restore Test using ${{ matrix.upgrade-path.dump_method }} for ${{ matrix.upgrade-path.title }} - format=${{ matrix.upgrade-path.dump_format }} - type=${{ matrix.upgrade-path.type }}
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2

Expand Down Expand Up @@ -74,6 +74,7 @@ jobs:
install_dir: ${{ steps.find-branch.outputs.base-dir }}
migration_mode: 'multi-db'
dump_restore: 'true'
engine_version: ${{ steps.read-base-and-final-version.outputs.base-version }}

- name: Setup Dump Restore Composite Action
id: setup-dump-restore-ca
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-code-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:

run-babelfish-code-coverage-for-pull_request:
needs: [run-jdbc-tests, run-odbc-tests, run-dotnet-tests, run-python-tests, run-isolation-tests]
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:

- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/python-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on: [workflow_call]

jobs:
run-babelfish-python-tests:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
id: checkout
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/singledb-version-upgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
ENGINE_BRANCH_FROM: BABEL_2_X_DEV__PG_14_X
EXTENSION_BRANCH_FROM: BABEL_2_X_DEV

runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2

Expand Down
Loading

0 comments on commit fb35931

Please sign in to comment.