From 11103268e9ef49e37b33ed267d4eac4c950363c9 Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Tue, 10 May 2022 15:52:15 +0200 Subject: [PATCH] make legacy tokenizer tests the extra on CI --- .github/actions/build-nominatim/action.yml | 17 ++++----- .github/actions/setup-postgresql/action.yml | 2 +- .github/workflows/ci-tests.yml | 42 ++++++--------------- vagrant/Install-on-Ubuntu-18.sh | 2 +- vagrant/Install-on-Ubuntu-20.sh | 2 +- 5 files changed, 23 insertions(+), 42 deletions(-) diff --git a/.github/actions/build-nominatim/action.yml b/.github/actions/build-nominatim/action.yml index 757decd4..042166ad 100644 --- a/.github/actions/build-nominatim/action.yml +++ b/.github/actions/build-nominatim/action.yml @@ -5,6 +5,10 @@ inputs: description: 'Version of Ubuntu to install on' required: false default: '20' + cmake-args: + description: 'Additional options to hand to cmake' + required: false + default: '' runs: using: "composite" @@ -21,18 +25,13 @@ runs: shell: bash env: UBUNTUVER: ${{ inputs.ubuntu }} - - - name: Download dependencies - run: | - if [ ! -f country_grid.sql.gz ]; then - wget --no-verbose https://www.nominatim.org/data/country_grid.sql.gz - fi - cp country_grid.sql.gz Nominatim/data/country_osm_grid.sql.gz - shell: bash + CMAKE_ARGS: ${{ inputs.cmake-args }} - name: Configure - run: mkdir build && cd build && cmake ../Nominatim + run: mkdir build && cd build && cmake $CMAKE_ARGS ../Nominatim shell: bash + env: + CMAKE_ARGS: ${{ inputs.cmake-args }} - name: Build run: | diff --git a/.github/actions/setup-postgresql/action.yml b/.github/actions/setup-postgresql/action.yml index 060a6789..19a19e17 100644 --- a/.github/actions/setup-postgresql/action.yml +++ b/.github/actions/setup-postgresql/action.yml @@ -22,7 +22,7 @@ runs: - name: Install PostgreSQL run: | - sudo apt-get install -y -qq --no-install-suggests --no-install-recommends postgresql-client-${PGVER} postgresql-${PGVER}-postgis-${POSTGISVER} postgresql-${PGVER}-postgis-${POSTGISVER}-scripts postgresql-contrib-${PGVER} postgresql-${PGVER} postgresql-server-dev-${PGVER} + sudo apt-get install -y -qq --no-install-suggests --no-install-recommends postgresql-client-${PGVER} postgresql-${PGVER}-postgis-${POSTGISVER} postgresql-${PGVER}-postgis-${POSTGISVER}-scripts postgresql-contrib-${PGVER} postgresql-${PGVER} shell: bash env: PGVER: ${{ inputs.postgresql-version }} diff --git a/.github/workflows/ci-tests.yml b/.github/workflows/ci-tests.yml index 6ebf1ab9..a08a995f 100644 --- a/.github/workflows/ci-tests.yml +++ b/.github/workflows/ci-tests.yml @@ -113,19 +113,9 @@ jobs: working-directory: Nominatim/test/bdd - icu-test: + legacy-test: needs: create-archive - strategy: - matrix: - ubuntu: [20] - include: - - ubuntu: 20 - postgresql: 13 - postgis: 3 - pytest: py.test-3 - php: 7.4 - - runs-on: ubuntu-${{ matrix.ubuntu }}.04 + runs-on: ubuntu-20.04 steps: - uses: actions/download-artifact@v2 @@ -138,35 +128,27 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: ${{ matrix.php }} - coverage: xdebug - tools: phpunit, phpcs, composer - - - uses: actions/setup-python@v2 - with: - python-version: 3.6 - if: matrix.ubuntu == 18 + php-version: 7.4 - uses: ./Nominatim/.github/actions/setup-postgresql with: - postgresql-version: ${{ matrix.postgresql }} - postgis-version: ${{ matrix.postgis }} + postgresql-version: 13 + postgis-version: 3 + + - name: Install Postgresql server dev + run: sudo apt-get install postgresql-server-dev-13 - uses: ./Nominatim/.github/actions/build-nominatim with: - ubuntu: ${{ matrix.ubuntu }} + ubuntu: 20 + cmake-args: -DBUILD_MODULE=on - name: Install test prerequsites run: sudo apt-get install -y -qq python3-behave - if: matrix.ubuntu == 20 - - - name: Install test prerequsites - run: pip3 install behave==1.2.6 - if: matrix.ubuntu == 18 - - name: BDD tests (icu tokenizer) + - name: BDD tests (legacy tokenizer) run: | - behave -DREMOVE_TEMPLATE=1 -DBUILDDIR=$GITHUB_WORKSPACE/build -DTOKENIZER=icu --format=progress3 + behave -DREMOVE_TEMPLATE=1 -DBUILDDIR=$GITHUB_WORKSPACE/build -DTOKENIZER=legacy --format=progress3 working-directory: Nominatim/test/bdd diff --git a/vagrant/Install-on-Ubuntu-18.sh b/vagrant/Install-on-Ubuntu-18.sh index 40ee7ba8..f9b88ab5 100755 --- a/vagrant/Install-on-Ubuntu-18.sh +++ b/vagrant/Install-on-Ubuntu-18.sh @@ -28,7 +28,7 @@ export DEBIAN_FRONTEND=noninteractive #DOCS: postgresql-server-dev-10 postgresql-10-postgis-2.4 \ postgresql-contrib-10 postgresql-10-postgis-scripts \ php php-pgsql php-intl libicu-dev python3-pip \ - python3-psutil python3-jinja2 python3-icu git + python3-psutil python3-jinja2 python3-yaml python3-icu git # Some of the Python packages that come with Ubuntu 18.04 are too old, so # install the latest version from pip: diff --git a/vagrant/Install-on-Ubuntu-20.sh b/vagrant/Install-on-Ubuntu-20.sh index cdfb20f2..4805db61 100755 --- a/vagrant/Install-on-Ubuntu-20.sh +++ b/vagrant/Install-on-Ubuntu-20.sh @@ -28,7 +28,7 @@ export DEBIAN_FRONTEND=noninteractive #DOCS: postgresql-contrib-12 postgresql-12-postgis-3-scripts \ php php-pgsql php-intl libicu-dev python3-dotenv \ python3-psycopg2 python3-psutil python3-jinja2 \ - python3-icu python3-datrie git + python3-icu python3-datrie python3-yaml git # # System Configuration -- 2.45.1