Skip to content

Use C++17 for builds #575

Use C++17 for builds

Use C++17 for builds #575

Workflow file for this run

name: CI
on: push
jobs:
prep-testbed:
runs-on: ubuntu-24.04
name: Prepare test bed
steps:
- uses: actions/checkout@v5
- id: set-matrix
run: |
sudo apt-get install jq
sudo bash ./tests/scripts/cran/install_cran_repos.sh
echo "Result:"
echo $(sudo bash ./tests/scripts/cran/get_R_releases.sh)
echo "::set-output name=matrix::$(sudo bash ./tests/scripts/cran/get_R_releases.sh)"
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
integration_tests:
needs: prep-testbed
environment: publish
name: Run integration tests for R=${{ matrix.r-version }}, with memory checker=${{ matrix.memory_checker }}
strategy:
fail-fast: false
matrix:
memory_checker:
- no_check
- valgrind
- asan_no_leak
r-version: ${{fromJson(needs.prep-testbed.outputs.matrix)}}
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install exasol-integration-test-docker-environment
- name: Start ITDE
run: itde spawn-test-environment --environment-name test --database-port-forward 8888 --bucketfs-port-forward 6666 --db-mem-size 4GB --create-certificates
working-directory: /tmp
- name: Copy certificate
run: mkdir /tmp/certificate && docker cp db_container_test:/certificates/rootCA.crt /tmp/certificate/rootCA.crt
- name: Docker login
run: echo "$SECRET_DOCKER_TOKEN" | docker login --username "$SECRET_DOCKER_USER_NAME" --password-stdin
env: # Set the secret as an input
SECRET_DOCKER_USER_NAME: ${{ secrets.CI4_DOCKERHUB_USERNAME }}
SECRET_DOCKER_TOKEN: ${{ secrets.CI4_DOCKERHUB_TOKEN }}
- name: Run all tests
run: |
./tests/scripts/pull_docker_image.sh ${{ matrix.r-version }}
./tests/scripts/execute_docker_test_env.sh ${{ matrix.r-version }} ${{ matrix.memory_checker }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
publish-main:
needs: [prep-testbed,integration_tests]
if: github.ref == 'refs/heads/main'
name: Publish to docker hub for R=${{ matrix.r-version }}
strategy:
fail-fast: false
matrix:
r-version: ${{fromJson(needs.prep-testbed.outputs.matrix)}}
runs-on: ubuntu-24.04
environment: publish
steps:
- uses: actions/checkout@v5
- name: Build new Docker image
run: "bash tests/scripts/build_docker_test_env.sh ${{ matrix.r-version }}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Docker login
run: echo "$SECRET_DOCKER_TOKEN" | docker login --username "$SECRET_DOCKER_USER_NAME" --password-stdin
env: # Set the secret as an input
SECRET_DOCKER_USER_NAME: ${{ secrets.CI4_DOCKERHUB_USERNAME }}
SECRET_DOCKER_TOKEN: ${{ secrets.CI4_DOCKERHUB_TOKEN }}
- name: Push new Docker images
run: "bash tests/scripts/push_docker_image.sh ${{ matrix.r-version }}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}