Skip to content

Commit

Permalink
Add Wikibase submodules to CI (#31)
Browse files Browse the repository at this point in the history
* 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 <jeroendedauw@gmail.com>
  • Loading branch information
malberts and JeroenDeDauw authored Nov 28, 2024
1 parent c977ced commit d91a21e
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ jobs:
strategy:
matrix:
include:
- mw: 'REL1_35'
php: 7.4
- mw: 'REL1_36'
php: 8.0
- mw: 'REL1_37'
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down
15 changes: 13 additions & 2 deletions .github/workflows/installMediaWiki.sh
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -47,4 +49,13 @@ cat <<EOT >> 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
1 change: 0 additions & 1 deletion psalm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
<extraFiles>
<directory name="../../includes" />
<directory name="../../vendor/wikimedia" />
<directory name="../../vendor/wikibase" />
<directory name="../../vendor/data-values" />
<directory name="../../extensions/Wikibase" />
</extraFiles>
Expand Down

0 comments on commit d91a21e

Please sign in to comment.