Skip to content

Commit

Permalink
GitHub Actions - Assemble and publish build artefacts (#1)
Browse files Browse the repository at this point in the history
fixing GitHub actions and unit tests
  • Loading branch information
affonsov authored Oct 28, 2021
1 parent 590ab3b commit 476f3f1
Show file tree
Hide file tree
Showing 15 changed files with 985 additions and 152 deletions.
47 changes: 16 additions & 31 deletions .github/workflows/linux-build.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
name: Timestream ODBC Driver for Linux
name: ODBC Driver for Linux

on:
push:
branches:
- master
- main
- develop
pull_request:
branches:
- master
- main
- develop

env:
Expand All @@ -16,6 +16,7 @@ env:
ODBC_BIN_PATH: "./build/odbc/bin"
ODBC_BUILD_PATH: "./build/odbc/build"
AWS_SDK_INSTALL_PATH: "./build/aws-sdk/install"
NOT_CONNECTED: 1

jobs:
build-linux64:
Expand All @@ -42,35 +43,27 @@ jobs:
run: |
sudo cp ./src/Tests/Tests/odbc-linux64.ini /etc/odbc.ini
sudo cp ./src/Tests/Tests/odbcinst-linux64.ini /etc/odbcinst.ini
mkdir /home/runner/work/timestream-odbc/timestream-odbc/odbc-logs
mkdir -p ${{ github.workspace }}/odbc-logs
export ODBCSYSINI=/etc/
export ODBCINSTINI=odbcinst.ini
export ODBCINI=/etc/odbc.ini
- name: configure-and-build-driver
run: |
./build_linux_release64_deb.sh
- name: configure-aws-credentials
if: success()
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- name: run-tests
if: success()
run: |
./build/odbc/bin/tests --gtest_filter=-TestSQLConnectSAMLAuth.*:TestSQLDriverConnectSAMLAuth.*
./build/odbc/bin/tests --gtest_output="xml:report.xml"
- name: prepare-test-results
if: always()
run: |
cp /tmp/timestreamodbc_*.log ${{ github.workspace }}/odbc-logs/
- name: upload-test-results
if: always()
cp ${{ github.workspace }}/report.xml ${{ github.workspace }}/odbc-logs/
- name: upload-test-report
if: failure()
uses: actions/upload-artifact@v2
with:
name: test-results-linux64
path: |
${{ github.workspace }}/odbc-logs/
path: ${{ github.workspace }}/report.xml
- name: build-deb-installer
if: success()
run: |
Expand Down Expand Up @@ -126,36 +119,28 @@ jobs:
run: |
sudo cp ./src/Tests/Tests/odbc-linux32.ini /etc/odbc.ini
sudo cp ./src/Tests/Tests/odbcinst-linux32.ini /etc/odbcinst.ini
mkdir /home/runner/work/timestream-odbc/timestream-odbc/odbc-logs
mkdir -p ${{ github.workspace }}/odbc-logs
export ODBCSYSINI=/etc/
export ODBCINSTINI=odbcinst.ini
export ODBCINI=/etc/odbc.ini
- name: configure-aws-credentials
if: success()
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- name: configure-and-build-driver
if: success()
run: |
./build_linux_release32_deb.sh
- name: run-tests
if: success()
run: |
./build/odbc/bin/tests --gtest_filter=-TestSQLConnectSAMLAuth.*:TestSQLDriverConnectSAMLAuth.*
./build/odbc/bin/tests --gtest_output="xml:report.xml"
- name: prepare-test-results
if: always()
run: |
cp /tmp/timestreamodbc_*.log ${{ github.workspace }}/odbc-logs/
- name: upload-test-results
if: always()
cp ${{ github.workspace }}/report.xml ${{ github.workspace }}/odbc-logs/
- name: upload-test-report
if: failure()
uses: actions/upload-artifact@v2
with:
name: test-results-linux32
path: |
${{ github.workspace }}/odbc-logs/
path: ${{ github.workspace }}/report.xml
- name: build-deb-installer
if: success()
run: |
Expand Down
47 changes: 25 additions & 22 deletions .github/workflows/mac-build.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
name: Timestream ODBC Driver for Mac
name: ODBC Driver for Mac

on:
workflow_dispatch:
push:
branches:
- main
- develop
pull_request:
branches:
- main
- develop

env:
CI_OUTPUT_PATH: "ci-output"
ODBC_LIB_PATH: "./build/odbc/lib"
ODBC_BIN_PATH: "./build/odbc/bin"
ODBC_BUILD_PATH: "./build/odbc/build"
AWS_SDK_INSTALL_PATH: "./build/aws-sdk/install"
NOT_CONNECTED: 1

jobs:
build-mac:
Expand All @@ -34,12 +42,6 @@ jobs:
- name: configure-and-build-driver
run: |
./build_mac_release64.sh
- name: configure-aws-credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- name: prepare-dsn
run: |
sudo mkdir /Library/ODBC
Expand All @@ -48,12 +50,13 @@ jobs:
mkdir ${{ github.workspace }}/odbc-logs
- name: run-tests
run: |
./build/odbc/bin/tests --gtest_filter=-TestSQLConnectSAMLAuth.*:TestSQLDriverConnectSAMLAuth.*
- name: print-test-logs
./build/odbc/bin/tests --gtest_output="xml:report.xml"
- name: upload-test-report
if: failure()
run: |
cat /tmp/timestreamodbc_*.log
cat ./aws_sdk_*.log
uses: actions/upload-artifact@v2
with:
name: test-result-macos
path: ${{ github.workspace }}/report.xml
- name: print-memory-leak-logs
if: always()
run: |
Expand All @@ -66,9 +69,9 @@ jobs:
path: |
${{ github.workspace }}/odbc-logs/
${{ github.workspace }}/leaks_
#- name: test
# run: |
# bash ./run_test_runner.sh
# - name: test
# run: |
# bash ./run_test_runner.sh
- name: build-installer
if: success()
run: |
Expand Down Expand Up @@ -98,9 +101,9 @@ jobs:
with:
name: mac64-installer
path: installer
#- name: upload-test-results
# if: success()
# uses: actions/upload-artifact@v2
# with:
# name: mac-test-results
# path: test-output
- name: upload-test-results
if: success()
uses: actions/upload-artifact@v2
with:
name: mac-test-results
path: test-output
22 changes: 10 additions & 12 deletions .github/workflows/mac-debug-build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Timestream ODBC Driver for Mac (Debug)
name: ODBC Driver for Mac (Debug)

on:
workflow_dispatch:
Expand All @@ -9,10 +9,13 @@ env:
ODBC_BIN_PATH: "./build/odbc/bin"
ODBC_BUILD_PATH: "./build/odbc/build"
AWS_SDK_INSTALL_PATH: "./build/aws-sdk/install"
NOT_CONNECTED: 1

jobs:
build-mac:
runs-on: macos-latest
env:
NOT_CONNETECD: 1
steps:
- uses: actions/checkout@v2
- name: run-cppcheck
Expand All @@ -37,25 +40,20 @@ jobs:
- name: configure-and-build-driver
run: |
./build_mac_debug64.sh
- name: configure-aws-credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- name: prepare-dsn
run: |
sudo mkdir /Library/ODBC
sudo mv ./src/Tests/Tests/odbc.ini /Library/ODBC
mkdir ${{ github.workspace }}/odbc-logs
- name: run-tests
run: |
./build/odbc/bin/tests --gtest_filter=-TestSQLConnectSAMLAuth.*:TestSQLDriverConnectSAMLAuth.*
- name: print-test-logs
./build/odbc/bin/tests --gtest_output="xml:report.xml"
- name: upload-test-report
if: failure()
run: |
cat /tmp/timestreamodbc_*.log
cat ./aws_sdk_*.log
uses: actions/upload-artifact@v2
with:
name: test-result-macos
path: ${{ github.workspace }}\report.xml
- name: print-memory-leak-logs
if: always()
run: |
Expand Down
18 changes: 0 additions & 18 deletions .github/workflows/release-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,6 @@ jobs:
run: |
brew install cppcheck
sh run_cppcheck.sh
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- name: upload-cppcheck-results
if: failure()
uses: actions/upload-artifact@v2
Expand Down Expand Up @@ -79,12 +73,6 @@ jobs:
uses: lukka/[email protected]
- name: add-msbuild-to-path
uses: microsoft/[email protected]
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- name: configure-and-build-driver
run: |
.\build_win_release32.ps1
Expand Down Expand Up @@ -116,12 +104,6 @@ jobs:
uses: lukka/[email protected]
- name: add-msbuild-to-path
uses: microsoft/[email protected]
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- name: configure-and-build-driver
run: |
.\build_win_release64.ps1
Expand Down
Loading

0 comments on commit 476f3f1

Please sign in to comment.