diff --git a/.docker/qgis-linux/Dockerfile b/.docker/qgis-linux/Dockerfile new file mode 100644 index 0000000..bdc8f00 --- /dev/null +++ b/.docker/qgis-linux/Dockerfile @@ -0,0 +1,43 @@ +FROM fedora:32 +MAINTAINER Matthias Kuhn +ARG QGIS_URL + +RUN dnf -y install \ + unzip \ + qt5-devel \ + clang \ + ninja-build \ + flex \ + bison \ + geos-devel \ + gdal-devel \ + libzip-devel \ + sqlite-devel \ + protobuf-devel \ + qca-qt5-devel \ + proj-devel \ + gsl-devel \ + python3-pyqt5-sip \ + python3-qt5-devel \ + python3-qscintilla-qt5 \ + exiv2-devel \ + qwt-qt5-devel \ + qtkeychain-qt5-devel \ + qscintilla-qt5-devel \ + spatialindex-devel \ + libspatialite-devel \ + protobuf-lite-devel \ + libpq-devel + + +RUN curl -LJ -o QGIS.tar.gz $QGIS_URL && \ + tar xzf QGIS.tar.gz && \ + mkdir build && \ + cd build && \ + cmake -GNinja ../QGIS-* && \ + ninja install && \ + cd .. && \ + rm -rf build && \ + rm -rf ../QGIS-* && \ + rm ../QGIS.tar.gz + diff --git a/.github/workflows/qgis-linux.yml b/.github/workflows/qgis-linux.yml new file mode 100644 index 0000000..db2f4a5 --- /dev/null +++ b/.github/workflows/qgis-linux.yml @@ -0,0 +1,38 @@ +name: Build QGIS + +on: + push: + branches: + - '**' + release: + types: + - published + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@master + + - name: Extract branch or tag name + id: extract_ref + run: echo ::set-output name=ref::${GITHUB_REF#refs/*/} + + - name: Extract QGIS url + id: extract_qgis + run: | + export $(grep URL_qgis= recipes/qgis/recipe.sh) + echo ::set-output name=url::$URL_qgis + + - name: Build + run: | + docker build --build-arg QGIS_URL=${{ steps.extract_qgis.outputs.url }} -t opengisch/qfield-test-docker:${{ steps.extract_ref.outputs.ref }} .docker/qgis-linux + + - name: Deploy to dockerhub + env: + DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} + DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} + run: | + echo "$DOCKERHUB_TOKEN" | docker login -u "$DOCKERHUB_USERNAME" --password-stdin + docker push opengisch/qfield-test-docker:${{ steps.extract_ref.outputs.ref }}