Skip to content

Commit

Permalink
Removes lara-js workflow, updates main and staging to use Gradle build
Browse files Browse the repository at this point in the history
  • Loading branch information
joaobispo committed Aug 12, 2024
1 parent 5acc7e6 commit 9d06b85
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 130 deletions.
65 changes: 0 additions & 65 deletions .github/workflows/ant-lara-js.yml

This file was deleted.

66 changes: 34 additions & 32 deletions .github/workflows/ant-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ on:
pull_request:
branches: [ master ]

# Daily at midnight
schedule:
- cron: '0 0 * * *'

permissions:
checks: write

Expand All @@ -17,47 +21,45 @@ jobs:

runs-on: ubuntu-latest


steps:
- uses: actions/checkout@v4
# Because of scheduled runs, by default run on default branch
with:
ref: master
path: workspace/jsweaver

- name: Cache ivy dependencies
id: cache-nivy
uses: actions/cache@v3
env:
cache-name: cache-ivy-dependencies
with:
# ivy dependencies cache files are stored in `~/.ivy2` on Linux/macOS
path: ~/.ivy2
key: ${{ runner.os }}-build-${{ env.cache-name }}

- name: Set up JDK 17
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'

- name: Generate build.xml
run: |
wget -q -N http://specs.fe.up.pt/tools/eclipse-build.jar
java -jar eclipse-build.jar https://github.com/specs-feup/specs-java-libs https://github.com/specs-feup/lara-framework ./
wget -N -O /usr/share/ant/lib/ivy-2.5.0.jar specs.fe.up.pt/libs/ivy-2.5.0.jar
- name: Build with Ant
run: |
ant -noinput -buildfile build.xml
- name: List directory
run: |
echo "Current folder"
ls
- name: Publish Test Report
uses: mikepenz/action-junit-report@v3.6.1
if: always() # always run even if the previous step fails

- name: Check out specs-java-libs repo
uses: actions/checkout@v4
with:
repository: specs-feup/specs-java-libs
path: workspace/specs-java-libs

- name: Check out lara-framework repo
uses: actions/checkout@v4
with:
repository: specs-feup/lara-framework
ref: feature/lara-js
path: workspace/lara-framework

# Configure Gradle for optimal use in GitHub Actions, including caching of downloaded dependencies.
# See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md
- name: Setup Gradle
uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3.1.0

# Setting up gradle multi-project would be helpful
- name: Build and Test Jackdaw
working-directory: workspace/jsweaver/jsweaver
run: gradle build test

- name: Publish Test Report
uses: mikepenz/action-junit-report@v4
if: always()
with:
report_paths: '**/reports-eclipse-build/TEST-*.xml'
report_paths: 'workspace/jsweaver/**/build/test-results/test/TEST-*.xml'
summary: true
#exclude_sources: ''
61 changes: 28 additions & 33 deletions .github/workflows/ant-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,50 +21,45 @@ jobs:

runs-on: ubuntu-latest

#defaults:
# run:
# working-directory: ./..

steps:
- uses: actions/checkout@v4
# Because of scheduled runs, by default run on default branch
with:
ref: staging
path: workspace/jsweaver

- name: Cache ivy dependencies
id: cache-nivy
uses: actions/cache@v3
env:
cache-name: cache-ivy-dependencies
with:
# ivy dependencies cache files are stored in `~/.ivy2` on Linux/macOS
path: ~/.ivy2
key: ${{ runner.os }}-build-${{ env.cache-name }}

- name: Set up JDK 17
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'

- name: Generate build.xml
run: |
wget -q -N http://specs.fe.up.pt/tools/eclipse-build.jar
java -jar eclipse-build.jar https://github.com/specs-feup/specs-java-libs https://github.com/specs-feup/lara-framework?commit=staging ./
wget -N -O /usr/share/ant/lib/ivy-2.5.0.jar specs.fe.up.pt/libs/ivy-2.5.0.jar
- name: Build with Ant
run: |
ant -noinput -buildfile build.xml
- name: Check out specs-java-libs repo
uses: actions/checkout@v4
with:
repository: specs-feup/specs-java-libs
path: workspace/specs-java-libs

- name: Check out lara-framework repo
uses: actions/checkout@v4
with:
repository: specs-feup/lara-framework
ref: feature/lara-js
path: workspace/lara-framework

# Configure Gradle for optimal use in GitHub Actions, including caching of downloaded dependencies.
# See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md
- name: Setup Gradle
uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3.1.0

# Setting up gradle multi-project would be helpful
- name: Build and Test Jackdaw
working-directory: workspace/jsweaver/jsweaver
run: gradle build test

- name: List directory
run: |
echo "Current folder"
ls
- name: Publish Test Report
uses: mikepenz/action-junit-report@v3.6.1
if: always() # always run even if the previous step fails
- name: Publish Test Report
uses: mikepenz/action-junit-report@v4
if: always()
with:
report_paths: '**/reports-eclipse-build/TEST-*.xml'
report_paths: 'workspace/jsweaver/**/build/test-results/test/TEST-*.xml'
summary: true
#exclude_sources: ''

0 comments on commit 9d06b85

Please sign in to comment.