Add OLE DB support #51
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ODBC Driver for Mac | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
env: | |
CI_OUTPUT_PATH: "ci-output" | |
ODBC_LIB_PATH: "${{github.workspace}}/build/odbc/lib" | |
ODBC_BIN_PATH: "${{github.workspace}}/build/odbc/bin" | |
ODBC_BUILD_PATH: "${{github.workspace}}/build/odbc/build" | |
TIMESTREAM_LOG_PATH: "${{github.workspace}}/build/odbc/logs" | |
TIMESTREAM_LOG_LEVEL: "4" | |
ODBCINSTINI: "${{github.workspace}}/build/odbc/lib/timestream-odbc-install.ini" | |
ODBCINI: "${{github.workspace}}/odbc.ini" | |
BIG_TABLE_PAGINATION_TEST_ENABLE: "TRUE" | |
# # AAD Test environment variables. Uncomment out to use GitHub secrets to enable AAD integration tests | |
# ENABLE_AAD_TEST: "TRUE" | |
# AAD_APP_ID: ${{secrets.AAD_APP_ID}} | |
# AAD_ROLE_ARN: ${{secrets.AAD_ROLE_ARN}} | |
# AAD_IDP_ARN: ${{secrets.AAD_IDP_ARN}} | |
# AAD_TENANT: ${{secrets.AAD_TENANT}} | |
# AAD_USER: ${{secrets.AAD_USER}} | |
# AAD_USER_PWD: ${{secrets.AAD_USER_PWD}} | |
# AAD_CLIENT_SECRET: ${{secrets.AAD_CLIENT_SECRET}} | |
# # OKTA Test environment variables. Uncomment out to use GitHub secrets to enable AAD integration tests | |
# ENABLE_OKTA_TEST: "TRUE" | |
# OKTA_HOST: ${{secrets.OKTA_HOST}} | |
# OKTA_USER: ${{secrets.OKTA_USER}} | |
# OKTA_USER_PWD: ${{secrets.OKTA_USER_PWD}} | |
# OKTA_APP_ID: ${{secrets.OKTA_APP_ID}} | |
# OKTA_ROLE_ARN: ${{secrets.OKTA_ROLE_ARN}} | |
# OKTA_IDP_ARN: ${{secrets.OKTA_IDP_ARN}} | |
jobs: | |
build-mac: | |
runs-on: macos-12 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: run-cppcheck | |
run: | | |
brew install cppcheck | |
sh run_cppcheck.sh | |
- name: upload-cppcheck-results | |
if: failure() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: cppcheck-results | |
path: cppcheck-results.log | |
- name: get-dependencies | |
run: | | |
brew tap homebrew/services | |
brew unlink unixodbc | |
brew install libiodbc | |
brew link --overwrite --force libiodbc | |
brew install cmake | |
brew install boost | |
- name: configure-and-build-driver | |
run: | | |
./build_mac_release64.sh | |
- name: update-environment-with-ODBC_DRIVER_VERSION | |
run: | | |
read -r ODBC_DRIVER_VERSION < ./src/ODBC_DRIVER_VERSION.txt | |
echo "ODBC_DRIVER_VERSION=$ODBC_DRIVER_VERSION" >> $GITHUB_ENV | |
- name: upload-package | |
uses: actions/upload-artifact@v3 | |
with: | |
name: AmazonTimestreamODBC-${{env.ODBC_DRIVER_VERSION}}.pkg | |
path: ./cmake-build64/AmazonTimestreamODBC-${{env.ODBC_DRIVER_VERSION}}.pkg | |
- name: register-odbc-driver | |
run: | | |
chmod +x scripts/register_driver_unix.sh | |
./scripts/register_driver_unix.sh | |
- name: Add access key masks | |
id: add-access-key-masks | |
run: | | |
echo "::add-mask::${{ secrets.AWS_ACCESS_KEY_ID }}"; | |
echo "::add-mask::${{ secrets.SECRET_ACCESS_KEY }}"; | |
- name: Check for AWS access key ID | |
id: check-for-aws-access-key-id | |
env: | |
secret_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
if: env.secret_key_id == '' | |
run: exit 1 | |
- name: Check for AWS secret access key | |
id: check-for-aws-secret-access-key | |
env: | |
secret_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
if: env.secret_key == '' | |
run: exit 1 | |
- name: configure-aws-credentials-for-tests | |
if: success() | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws-region: us-west-2 | |
- name: run-unit-tests | |
id: rununittests | |
run: | | |
mkdir -p "${{env.TIMESTREAM_LOG_PATH}}" | |
export DYLD_LIBRARY_PATH=${{env.ODBC_LIB_PATH}}:$DYLD_LIBRARY_PATH | |
./build/odbc/bin/timestream-odbc-unit-tests --catch_system_errors=false | |
- name: upload-unit-test-report | |
if: always() | |
uses: EnricoMi/publish-unit-test-result-action/composite@v1.30 | |
with: | |
check_name: "MacOS Big Sur 11 Build Unit Test Results Check" | |
comment_title: "MacOS Big Sur 11 Build Unit Test Results" | |
files: ./odbc_unit_test_result.xml | |
- name: upload-unit-test-file | |
if: always() && (steps.rununittests.outcome == 'failure') | |
uses: actions/upload-artifact@v3 | |
with: | |
name: odbc-unit-test-results | |
path: | | |
./odbc_unit_test_result.xml | |
./build/odbc/logs/timestream_odbc_*.log | |
- name: run-integration-tests | |
id: runintegrationtests | |
run: | | |
export DYLD_LIBRARY_PATH=${{env.ODBC_LIB_PATH}}:$DYLD_LIBRARY_PATH | |
./build/odbc/bin/timestream-odbc-integration-tests --catch_system_errors=false | |
- name: upload-integration-test-report | |
if: always() | |
uses: EnricoMi/publish-unit-test-result-action/composite@v1.30 | |
with: | |
check_name: "MacOS Big Sur 11 Build Integration Test Results Check" | |
comment_title: "MacOS Big Sur 11 Build Integration Test Results" | |
files: ./odbc_test_result.xml | |
- name: upload-integration-test-file | |
if: always() && (steps.runintegrationtests.outcome == 'failure') | |
uses: actions/upload-artifact@v3 | |
with: | |
name: odbc-integration-test-results | |
path: | | |
./odbc_test_result.xml | |
./build/odbc/logs/timestream_odbc_*.log |