Skip to content
This repository has been archived by the owner on Feb 25, 2023. It is now read-only.

Commit

Permalink
Use buildscript to build in GitHub actions
Browse files Browse the repository at this point in the history
  • Loading branch information
itsaky committed Aug 5, 2022
1 parent 16be8ba commit 69eb4e4
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
17 changes: 12 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,21 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 8
uses: actions/setup-java@v1
- name: Set up JDK 8
uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'temurin'
java-version: '8'
- run: echo "JAVA_8=$JAVA_HOME" >> $GITHUB_ENV
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- name: "Build nb-javac-android"
run: "ant -f ./make/langtools/netbeans/nb-javac clean jar"
run: "./build.sh clean jar"
- name: "Unit Test nb-javac-android"
run: ant -f ./make/langtools/netbeans/nb-javac -Dnb.internal.action.name=test -Dignore.failing.tests=true test
run: "./test.sh"
- name: Upload JAR
uses: actions/upload-artifact@v2
if: ${{ !github.head_ref }}
Expand Down
5 changes: 5 additions & 0 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ export ant_dir=./make/langtools/netbeans/nb-javac

# Build nb-javac-android
JDK_8="/usr/lib/jvm/java-8-openjdk-amd64"

if [[ -z "$CI" ]]; then
JDK_8=$JAVA_8
fi

if [ -d "$JDK_8" ]; then
export JAVA_HOME=$JDK_8
fi
Expand Down

0 comments on commit 69eb4e4

Please sign in to comment.