Skip to content

Commit

Permalink
only check node version when necessary, always run basic factory build
Browse files Browse the repository at this point in the history
  • Loading branch information
LukasFey-GIP committed Nov 3, 2023
1 parent 2f7c90e commit 35eadca
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 15 deletions.
10 changes: 1 addition & 9 deletions .github/workflows/build-on-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,29 +14,21 @@ jobs:
java-version: 11
distribution: 'zulu'

- name: Use Node.js 18.10
uses: actions/setup-node@v3
with:
node-version: '18.10'

- name: Check out xyna-factory
uses: actions/checkout@v3

- name: determine changed modules
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh pr diff {{ github.event.pull_request.number }} --name-only | grep '^modules/' | cut -f 2-3 -d/ | sort | uniq | tee changed-modules.txt
echo "CHANGES=$(cat changed-modules.txt | wc -l)" >> "$GITHUB_ENV"
gh pr diff ${{ github.event.pull_request.number }} --name-only | grep '^modules/' | cut -f 2-3 -d/ | sort | uniq | tee changed-modules.txt
- name: build basic factory
run: |
cd installation
./build.sh build
if: env.CHANGES > 0
- name: build changed modules
run: |
cd modules
for d in $(cat ../changed-modules.txt); do test -d "$d" && ant -Doracle.home=/tmp -f "$d/build.xml"; done
if: env.CHANGES > 0
6 changes: 1 addition & 5 deletions .github/workflows/nightbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:

strategy:
matrix:
node-version: [16.x]
node-version: [18.x]
java-version: [11]

steps:
Expand All @@ -39,8 +39,4 @@ jobs:
- name: build
run: |
cd installation
./updateVersion.sh $(grep "release.number=v" ./delivery/delivery.properties | sed 's/release.number=v//g')
sed -i 's/# main/set -e/' ./build.sh
sed -i 's/nvm --version//' ./build.sh
sed -i 's/nvm use .*//' ./build.sh
./build.sh all
6 changes: 5 additions & 1 deletion installation/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,13 @@ check_dependencies() {
mvn --version
ant -version
git --version
node --version
zip --version
}

check_dependencies_frontend() {
node --version
}

checkout_factory() {
echo "cheking out factory..."
# $1 where to check out
Expand Down Expand Up @@ -653,6 +656,7 @@ case $1 in
build
;;
"all")
check_dependencies_frontend
build_all
;;
"compose")
Expand Down

0 comments on commit 35eadca

Please sign in to comment.