[mod] use action
This commit is contained in:
parent
309a48de90
commit
68a6b99b85
4 changed files with 8 additions and 28 deletions
|
@ -18,32 +18,16 @@ jobs:
|
||||||
distribution: "temurin"
|
distribution: "temurin"
|
||||||
java-version: "17"
|
java-version: "17"
|
||||||
|
|
||||||
- name: Download BaseX
|
|
||||||
run: |
|
|
||||||
BASEX_VERSION="10.7" # Example version (adjust as needed)
|
|
||||||
# Remove dots from version for filename (e.g., "11.7" → "117") "9.7.4","10.7"
|
|
||||||
BASEX_CLEAN_VERSION="${BASEX_VERSION//./}"
|
|
||||||
wget https://files.basex.org/releases/$BASEX_VERSION/BaseX$BASEX_CLEAN_VERSION.zip -O BaseX.zip
|
|
||||||
|
|
||||||
- name: Unzip BaseX
|
|
||||||
run: |
|
|
||||||
unzip BaseX.zip -d $HOME
|
|
||||||
rm BaseX.zip
|
|
||||||
|
|
||||||
- name: Add BaseX to PATH
|
|
||||||
run: |
|
|
||||||
echo "BASEX_ROOT=$HOME/basex" >> $GITHUB_ENV
|
|
||||||
echo "PATH=$PATH:$HOME/basex/bin" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Verify BaseX installation
|
|
||||||
run: |
|
|
||||||
basex -c "SHOW OPTIONS"
|
|
||||||
|
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
ref: main
|
ref: main
|
||||||
|
|
||||||
|
- name: Install BaseX
|
||||||
|
uses: ./.github/actions/install-basex
|
||||||
|
with:
|
||||||
|
basex-version: '11.7' # Specify the BaseX version here
|
||||||
|
|
||||||
- name: Build package
|
- name: Build package
|
||||||
run: |
|
run: |
|
||||||
basex scripts/make-xar.xq
|
basex scripts/make-xar.xq
|
||||||
|
|
|
@ -30,4 +30,4 @@ jobs:
|
||||||
|
|
||||||
- name: Run BaseX command
|
- name: Run BaseX command
|
||||||
run: |
|
run: |
|
||||||
basex 2+2
|
basex "2+2"
|
|
@ -5,4 +5,4 @@ Xyxh
|
||||||
4456
|
4456
|
||||||
9.7.4 xyxz01x
|
9.7.4 xyxz01x
|
||||||
ab
|
ab
|
||||||
iiiisAa
|
iiiisAas
|
6
.github/actions/install-basex/action.yaml
vendored
6
.github/actions/install-basex/action.yaml
vendored
|
@ -18,20 +18,16 @@ runs:
|
||||||
- name: Unzip BaseX
|
- name: Unzip BaseX
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
unzip BaseX.zip -d $HOME
|
unzip BaseX.zip -d $HOME
|
||||||
echo "rm"
|
|
||||||
rm BaseX.zip
|
rm BaseX.zip
|
||||||
echo "done"
|
|
||||||
|
|
||||||
- name: Add BaseX to PATH
|
- name: Add BaseX to PATH
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
set -x # Enable debugging
|
|
||||||
echo "BASEX_ROOT=$HOME/basex" >> $GITHUB_ENV
|
echo "BASEX_ROOT=$HOME/basex" >> $GITHUB_ENV
|
||||||
echo "PATH=$PATH:$HOME/basex/bin" >> $GITHUB_ENV
|
echo "PATH=$PATH:$HOME/basex/bin" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Verify BaseX installation
|
- name: Verify BaseX installation
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
set -x # Enable debugging
|
|
||||||
basex "declare option output:indent 'yes';db:system()"
|
basex "declare option output:indent 'yes';db:system()"
|
||||||
|
|
Loading…
Add table
Reference in a new issue