Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: GateNLP/gate-core
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v9.0.1
Choose a base ref
...
head repository: GateNLP/gate-core
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Loading
161 changes: 161 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,161 @@
name: CI

on:
push:
branches:
- master

# Prevent concurrent builds of the same branch - a new push will cancel the
# running workflow and start another
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
checks: write

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout Master Branch
uses: actions/checkout@v4

- name: Setup Pages
uses: actions/configure-pages@v5
continue-on-error: true
# This step may error out when run in a fork that doesn't have pages
# enabled - if this happens, run the rest but skip anything that
# involves publishing to pages. The last thing configure-pages does
# is set an environment variable GITHUB_PAGES=true which is visible
# to subsequent steps, so we can condition on that.

- name: Set up JDK 8
uses: actions/setup-java@v4
with:
java-version: '8'
distribution: 'zulu'
cache: maven

- name: Set up Maven
uses: stCarolas/setup-maven@v5
with:
maven-version: "3.8.8"

# Override http://repo.gate.ac.uk to use https:// instead
- name: Configure Maven settings
uses: whelk-io/maven-settings-xml-action@v22
with:
mirrors: >
[
{
"id": "gate.ac.uk-https",
"name": "GATE repo (secure)",
"mirrorOf": "gate.ac.uk",
"url": "https://repo.gate.ac.uk/content/groups/public/"
}
]
repositories: >
[
{
"id": "central",
"name": "Maven Central",
"url": "https://repo1.maven.org/maven2",
"releases": {
"enabled": "true"
},
"snapshots": {
"enabled": "false"
}
}
]
plugin_repositories: >
[
{
"id": "central",
"name": "Maven Central",
"url": "https://repo1.maven.org/maven2",
"releases": {
"enabled": "true"
},
"snapshots": {
"enabled": "false"
}
}
]
servers: >
[
{
"id": "gate.snapshots",
"username": "${{ secrets.GATE_REPO_USERNAME }}",
"password": "${{ secrets.GATE_REPO_PASSWORD }}"
}
]
- name: Build with Maven
run: mvn --batch-mode -e clean install

- name: Publish Test Report
if: success() || failure()
uses: EnricoMi/publish-unit-test-result-action@v2
with:
junit_files: "target/surefire-reports/*.xml"

- name: Build site
run: mvn --batch-mode -e -DskipTests site

- name: Upload artifact
if: env.GITHUB_PAGES == 'true'
uses: actions/upload-pages-artifact@v3
with:
# Upload entire repository
path: 'target/site'

# Only do the deply and distro if we're in the main GateNLP repo, not a fork
- name: Deploy to repo.gate.ac.uk
if: github.repository == 'GateNLP/gate-core' && github.ref == 'refs/heads/master'
run: mvn --batch-mode -e -Dmaven.test.skip=true source:jar javadoc:jar deploy

- name: Fetch latest userguide
if: github.repository == 'GateNLP/gate-core' && github.ref == 'refs/heads/master'
run: wget -O target/tao.pdf https://gate.ac.uk/sale/tao/tao.pdf

- name: Build and deploy distribution
if: github.repository == 'GateNLP/gate-core' && github.ref == 'refs/heads/master'
run: cd distro && mvn --batch-mode -e "-Dtao.pdf=$GITHUB_WORKSPACE/target/tao.pdf" -Pinstaller deploy

# We want to avoid cacheing -SNAPSHOT dependencies from our local maven
# cache, to ensure that we always go out and check for them again at the
# next build in case they have changed.
- name: Delete snapshots from m2 repository
if: always()
run: |
find ~/.m2/repository -name \*-SNAPSHOT -type d -exec rm -rf {} \+ || :
- name: Deploy site to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
if: env.GITHUB_PAGES == 'true'

downstream:
needs: build
runs-on: ubuntu-latest
if: github.repository == 'GateNLP/gate-core' && github.ref == 'refs/heads/master'

steps:
- name: "Trigger gate-top"
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GATE_TOP_TOKEN }}
script: |
github.rest.actions.createWorkflowDispatch({
owner: "GateNLP",
repo: "gate-top",
workflow_id: "ci.yaml",
ref: "master",
});
44 changes: 44 additions & 0 deletions .github/workflows/pull-request-test-reports.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Test Reports (PR)

on:
workflow_run:
workflows: ["Pull Request"]
types:
- completed

permissions: {}

jobs:
test-results:
name: Test Results
runs-on: ubuntu-latest
if: github.event.workflow_run.conclusion != 'skipped'

permissions:
checks: write
pull-requests: write
actions: read

steps:
- name: Download and Extract Artifacts
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
run: |
mkdir -p artifacts && cd artifacts
artifacts_url=${{ github.event.workflow_run.artifacts_url }}
gh api --paginate "$artifacts_url" -q '.artifacts[] | [.name, .archive_download_url] | @tsv' | while read artifact
do
IFS=$'\t' read name url <<< "$artifact"
gh api $url > "$name.zip"
unzip -d "$name" "$name.zip"
done
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
with:
commit: ${{ github.event.workflow_run.head_sha }}
event_file: artifacts/Event File/event.json
event_name: ${{ github.event.workflow_run.event }}
junit_files: "artifacts/Test Results/**/*.xml"
92 changes: 92 additions & 0 deletions .github/workflows/pull-request.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
name: Pull Request

on:
pull_request:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout PR
uses: actions/checkout@v4

- name: Set up JDK 8
uses: actions/setup-java@v4
with:
java-version: '8'
distribution: 'zulu'
cache: maven

- name: Set up Maven
uses: stCarolas/setup-maven@v5
with:
maven-version: "3.8.8"

# Override http://repo.gate.ac.uk to use https:// instead
- name: Configure Maven settings
uses: whelk-io/maven-settings-xml-action@v22
with:
mirrors: >
[
{
"id": "gate.ac.uk-https",
"name": "GATE repo (secure)",
"mirrorOf": "gate.ac.uk",
"url": "https://repo.gate.ac.uk/content/groups/public/"
}
]
repositories: >
[
{
"id": "central",
"name": "Maven Central",
"url": "https://repo1.maven.org/maven2",
"releases": {
"enabled": "true"
},
"snapshots": {
"enabled": "false"
}
}
]
plugin_repositories: >
[
{
"id": "central",
"name": "Maven Central",
"url": "https://repo1.maven.org/maven2",
"releases": {
"enabled": "true"
},
"snapshots": {
"enabled": "false"
}
}
]
- name: Build with Maven
run: mvn --batch-mode -e clean install

- name: Upload Test Results
if: success() || failure()
uses: actions/upload-artifact@v4
with:
name: Test Results
path: |
target/surefire-reports/*.xml
- name: Build site
run: mvn --batch-mode -e -DskipTests site

event_file:
name: "Event File"
runs-on: ubuntu-latest
steps:
- name: Upload
uses: actions/upload-artifact@v4
with:
name: Event File
path: ${{ github.event_path }}
7 changes: 5 additions & 2 deletions distro/GATE.app/Contents/MacOS/GATE
Original file line number Diff line number Diff line change
@@ -25,9 +25,12 @@ while [ -h "$PRG" ]; do
fi
done

progdir=`dirname "$PRG"`
progdir="`dirname "$PRG"`"
gatehome="$progdir/../../.."
# Make sure GATE_HOME is the working directory
cd "$gatehome"

exec "$progdir/../../../bin/gate.sh" \
exec "bin/gate.sh" \
-Dapple.laf.useScreenMenuBar=true \
-Dcom.apple.mrj.application.growbox.intrudes=true \
-Dapple.awt.antialiasing=true \
34 changes: 33 additions & 1 deletion distro/pom.xml
Original file line number Diff line number Diff line change
@@ -21,6 +21,15 @@
<tao.pdf>/path/to/tao.pdf</tao.pdf>
</properties>

<distributionManagement>
<snapshotRepository>
<id>gate.snapshots</id>
<name>GATE Snapshots Repository</name>
<url>https://repo.gate.ac.uk/content/repositories/snapshots</url>
<layout>default</layout>
</snapshotRepository>
</distributionManagement>

<build>
<plugins>
<plugin>
@@ -149,6 +158,29 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.3.0</version>
<executions>
<execution>
<id>attach-artifacts</id>
<phase>package</phase>
<goals>
<goal>attach-artifact</goal>
</goals>
<configuration>
<artifacts>
<artifact>
<file>target/gate-developer-${project.version}-installer.exe</file>
<type>exe</type>
<classifier>installer</classifier>
</artifact>
</artifacts>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
@@ -164,7 +196,7 @@
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.2.3</version>
<version>1.2.13</version>
</dependency>

<!-- Slightly nasty trick to get the javadocs -->
Loading