Skip to content

Commit a70a64f

Browse files
author
Lane Anderson
committed
Update workflow to use Maven instead of Ant
1 parent 7975ec7 commit a70a64f

1 file changed

Lines changed: 48 additions & 39 deletions

File tree

.github/workflows/linux-build.yml

Lines changed: 48 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,56 @@
1-
name: Linux DEB Build
1+
name: Build and Release
22

33
on:
4+
# This "**" means it will run on the branch you are currently testing
45
push:
5-
branches: [ "dev", "release/**", "main" ]
6+
branches: [ "**" ]
67
pull_request:
7-
branches: [ "dev", "release/**" ]
8-
workflow_dispatch:
8+
branches: [ main ]
9+
workflow_dispatch: # This adds a button to manually trigger the build
910

1011
jobs:
11-
build-debian:
12+
# --- WINDOWS MSI BUILD ---
13+
build-windows:
14+
runs-on: windows-latest
15+
steps:
16+
- name: Checkout Repository
17+
uses: actions/checkout@v4
18+
19+
- name: Set up JDK 25
20+
uses: actions/setup-java@v4
21+
with:
22+
java-version: '25'
23+
distribution: 'temurin'
24+
cache: maven
25+
26+
- name: Build Windows MSI
27+
run: mvn clean install -P win-msi
28+
29+
- name: Upload MSI Artifact
30+
uses: actions/upload-artifact@v4
31+
with:
32+
name: jdiskmark-windows-msi
33+
path: jdm-dist/jdm-windows/target/*.msi
34+
35+
# --- LINUX DEBIAN BUILD ---
36+
build-linux:
1237
runs-on: ubuntu-latest
13-
1438
steps:
15-
- name: Checkout Repository
16-
uses: actions/checkout@v4
17-
18-
- name: Set up JDK 25
19-
uses: actions/setup-java@v4
20-
with:
21-
java-version: '25'
22-
distribution: 'oracle'
23-
24-
- name: Cache Ant Dependencies
25-
uses: actions/cache@v4
26-
with:
27-
path: libs
28-
key: ${{ runner.os }}-ant-${{ hashFiles('build.xml') }}
29-
restore-keys: |
30-
${{ runner.os }}-ant-
31-
32-
- name: Install Build Dependencies
33-
run: |
34-
sudo apt-get update
35-
sudo apt-get install -y ant ant-optional fakeroot dpkg-dev
36-
37-
- name: Build Standard DEB
38-
run: ant create-deb
39-
40-
- name: Build Fat DEB
41-
run: ant create-fat-deb
42-
43-
- name: Upload Artifacts
44-
uses: actions/upload-artifact@v4
45-
with:
46-
name: jdiskmark-debs
47-
path: dist/*.deb
39+
- name: Checkout Repository
40+
uses: actions/checkout@v4
41+
42+
- name: Set up JDK 25
43+
uses: actions/setup-java@v4
44+
with:
45+
java-version: '25'
46+
distribution: 'temurin'
47+
cache: maven
48+
49+
- name: Build Debian Package
50+
run: mvn clean install -P linux-deb
51+
52+
- name: Upload DEB Artifact
53+
uses: actions/upload-artifact@v4
54+
with:
55+
name: jdiskmark-debian-pkg
56+
path: jdm-dist/target/*.deb

0 commit comments

Comments
 (0)