Merge lp:~yrke/tapaal/github-actions into lp:tapaal

Proposed by Kenneth Yrke Jørgensen
Status: Merged
Approved by: Kenneth Yrke Jørgensen
Approved revision: 1121
Merged at revision: 1121
Proposed branch: lp:~yrke/tapaal/github-actions
Merge into: lp:tapaal
Diff against target: 55 lines (+49/-0)
1 file modified
.github/workflows/build.yml (+49/-0)
To merge this branch: bzr merge lp:~yrke/tapaal/github-actions
Reviewer Review Type Date Requested Status
TAPAAL Reviewers Pending
Review via email: mp+400093@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added directory '.github'
2=== added directory '.github/workflows'
3=== added file '.github/workflows/build.yml'
4--- .github/workflows/build.yml 1970-01-01 00:00:00 +0000
5+++ .github/workflows/build.yml 2021-03-24 10:07:55 +0000
6@@ -0,0 +1,49 @@
7+name: Java CI with Gradle
8+
9+on:
10+ push:
11+ branches: [ master ]
12+ pull_request:
13+ branches: [ master ]
14+
15+jobs:
16+ build:
17+
18+ runs-on: ubuntu-latest
19+
20+ steps:
21+ - uses: actions/checkout@v2
22+ - name: Set up JDK 11
23+ uses: actions/setup-java@v1
24+ with:
25+ java-version: 11
26+
27+ - name: Cache Gradle packages
28+ uses: actions/cache@v2
29+ with:
30+ path: |
31+ ~/.gradle/caches
32+ ~/.gradle/wrapper
33+ key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
34+ restore-keys: |
35+ ${{ runner.os }}-gradle-
36+
37+ - name: Install xvfb
38+ run: |
39+ sudo apt-get install -y xvfb
40+
41+ - name: Grant execute permission for gradlew
42+ run: chmod +x gradlew
43+
44+ - name: Build with Gradle
45+ #Run in xvfb buffer, https://jxbrowser-support.teamdev.com/docs/guides/x-server-in-headless-linux.html
46+ run: xvfb-run --server-args="-screen 0 800x600x24+32" ./gradlew -Djava.awt.headless=false build
47+
48+ - name: Cleanup Gradle Cache
49+ # Remove some files from the Gradle cache, so they aren't cached by GitHub Actions.
50+ # Restoring these files from a GitHub Actions cache might cause problems for future builds.
51+ run: |
52+ rm -f ~/.gradle/caches/modules-2/modules-2.lock
53+ rm -f ~/.gradle/caches/modules-2/gc.properties
54+
55+

Subscribers

People subscribed via source and target branches