From d91a21e288b0c4f39d6d5f9df52e43e9971da6a3 Mon Sep 17 00:00:00 2001 From: Morne Alberts Date: Thu, 28 Nov 2024 21:43:38 +0200 Subject: [PATCH] Add Wikibase submodules to CI (#31) * Add Wikibase submodules to CI * Bump cache version * Exit on installer error * Checkout tag * Checkout branch instead * Bump cache again * Add tembox submodule * Update ci.yml * Remove termbox * MW 35 workaround * skip 35 * Psalm 35->39 * Update psalm.xml * Update psalm.xml --------- Co-authored-by: Jeroen De Dauw --- .github/workflows/ci.yml | 6 ++---- .github/workflows/installMediaWiki.sh | 15 +++++++++++++-- psalm.xml | 1 - 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 834f5ef..b44e320 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,8 +11,6 @@ jobs: strategy: matrix: include: - - mw: 'REL1_35' - php: 7.4 - mw: 'REL1_36' php: 8.0 - mw: 'REL1_37' @@ -44,7 +42,7 @@ jobs: mediawiki !mediawiki/extensions/ !mediawiki/vendor/ - key: mw_${{ matrix.mw }}-php${{ matrix.php }}_v3 + key: mw_${{ matrix.mw }}-php${{ matrix.php }}_v4 - name: Cache Composer cache uses: actions/cache@v2 @@ -188,7 +186,7 @@ jobs: - name: Install MediaWiki if: steps.cache-mediawiki.outputs.cache-hit != 'true' working-directory: ~ - run: bash EarlyCopy/.github/workflows/installMediaWiki.sh REL1_35 AutomatedValues + run: bash EarlyCopy/.github/workflows/installMediaWiki.sh REL1_39 AutomatedValues - uses: actions/checkout@v2 with: diff --git a/.github/workflows/installMediaWiki.sh b/.github/workflows/installMediaWiki.sh index 18fe934..4d43fc9 100644 --- a/.github/workflows/installMediaWiki.sh +++ b/.github/workflows/installMediaWiki.sh @@ -1,9 +1,11 @@ #! /bin/bash +set -e + MW_BRANCH=$1 EXTENSION_NAME=$2 -wget https://github.com/wikimedia/mediawiki/archive/$MW_BRANCH.tar.gz -nv +wget https://github.com/wikimedia/mediawiki/archive/refs/heads/$MW_BRANCH.tar.gz -nv tar -zxf $MW_BRANCH.tar.gz mv mediawiki-$MW_BRANCH mediawiki @@ -47,4 +49,13 @@ cat <> composer.local.json EOT cd extensions -git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/Wikibase --branch=$MW_BRANCH --recurse-submodules -j8 + +git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/Wikibase --depth=1 --branch=$MW_BRANCH -j8 +cd Wikibase +git submodule set-url view/lib/wikibase-serialization https://github.com/wmde/WikibaseSerializationJavaScript.git +git submodule set-url view/lib/wikibase-data-values https://github.com/wmde/DataValuesJavaScript.git +git submodule set-url view/lib/wikibase-data-model https://github.com/wmde/WikibaseDataModelJavaScript.git +if [ "$MW_BRANCH" == "REL1_35" ]; then + git submodule set-url view/lib/wikibase-termbox https://github.com/wmde/wikibase-termbox.git +fi +git submodule sync && git submodule init && git submodule update --recursive diff --git a/psalm.xml b/psalm.xml index 0baa3aa..1084b25 100644 --- a/psalm.xml +++ b/psalm.xml @@ -24,7 +24,6 @@ -