Skip to content

Build with openjpeg #62

Build with openjpeg

Build with openjpeg #62

Workflow file for this run

name: Ubuntu 20.04 build
on:
push:
paths-ignore:
- 'doc/**'
branches-ignore:
- 'backport**'
pull_request:
paths-ignore:
- 'doc/**'
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
ubuntu_20_04_build:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]')"
env:
HANA_CONNECTION_STR: "DRIVER=/usr/sap/hdbclient/libodbcHDB.so;HOST=917df316-4e01-4a10-be54-eac1b6ab15fb.hana.prod-us10.hanacloud.ondemand.com;PORT=443;USER=GDALCI;PASSWORD=u7t!Ukeugzq7"
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Cache deps
uses: actions/cache@v3
id: cache-deps
with:
path: /tmp/docker
key: ${{ runner.os }}-cache-ubuntu-20.04-${{ hashFiles('.github/workflows/ubuntu_20.04/build-deps.sh') }}-${{ github.run_id }}
restore-keys: ${{ runner.os }}-cache-ubuntu-20.04-${{ hashFiles('.github/workflows/ubuntu_20.04/build-deps.sh') }}-
- name: Build or restore dependencies
run: |
if test -f /tmp/docker/gdal-deps-ubuntu-20.04.tar; then
docker image load -i /tmp/docker/gdal-deps-ubuntu-20.04.tar
docker images
else
docker build -f .github/workflows/ubuntu_20.04/Dockerfile.deps -t gdal-deps-ubuntu-20.04 .github/workflows/ubuntu_20.04
mkdir -p /tmp/docker
docker image save -o /tmp/docker/gdal-deps-ubuntu-20.04.tar gdal-deps-ubuntu-20.04
fi
- name: Get Architecture
id: get-arch
run: |
export ARCH=$(cc -march=native -### -E - < /dev/null 2>&1 | sed -ne 's/.*cc1 .*-march=\([^ "]*\)[ "].*/\1/p')
echo "Architecture: $ARCH"
echo "::set-output name=arch::$ARCH"
- name: Cache build
uses: actions/cache@v3
id: cache-build
with:
path: ${{ github.workspace }}/ccache.tar.gz
key: ${{ runner.os }}-cache-ubuntu-20.04-${{ steps.get-arch.outputs.arch }}-${{ hashFiles('.github/workflows/ubuntu_20.04/build-deps.sh') }}-${{ github.run_id }}
restore-keys: ${{ runner.os }}-cache-ubuntu-20.04-${{ steps.get-arch.outputs.arch }}-${{ hashFiles('.github/workflows/ubuntu_20.04/build-deps.sh') }}-
- name: gcc compilation flags
run: docker run --rm gdal-deps-ubuntu-20.04 sh -c "g++ -march=native -dM -E -x c++ - < /dev/null | grep -E 'SSE|AVX'"
- name: Build
run: docker build -f .github/workflows/ubuntu_20.04/Dockerfile -t gdal .
- name: Fetching ccache.tar.gz from Docker build
run: docker run --rm -v $PWD:/mytmp gdal cp /build/ccache.tar.gz /mytmp
- name: Run tests
# --security-opt seccomp=unconfined, so that the userfaulfd syscall is available
run: docker run -e CI -e TRAVIS=yes -e TRAVIS_BRANCH=ubuntu_2004 -e GITHUB_WORKFLOW -e OGR_HANA_CONNECTION_STRING=${HANA_CONNECTION_STR} --security-opt seccomp=unconfined --rm gdal sh -c "cd /build && pip3 install -U -r autotest/requirements.txt && pip3 install -U hdbcli && cd build && ctest -V"