Skip to content

Commit fa0cf10

Browse files
committed
Action cleanup
1 parent b694110 commit fa0cf10

File tree

6 files changed

+114
-99
lines changed

6 files changed

+114
-99
lines changed

.github/workflows/build-gradle.yml

Lines changed: 35 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,63 @@
1-
name: Pre-releases with Gradle
1+
name: Branch Builds
22
on:
33
push:
44
paths-ignore:
55
- '**/*.md'
66
- '.all-contributorsrc'
77

88
jobs:
9+
test:
10+
runs-on: ubuntu-latest
11+
name: Test Processing
12+
steps:
13+
- name: Checkout Repository
14+
uses: actions/checkout@v4
15+
- name: Install Java
16+
uses: actions/setup-java@v4
17+
with:
18+
java-version: '17'
19+
distribution: 'temurin'
20+
- name: Setup Gradle
21+
uses: gradle/actions/setup-gradle@v4
22+
23+
- name: Build with Gradle
24+
run: ./gradlew test
925
build:
10-
name: Create Pre-release for ${{ matrix.os_prefix }} (${{ matrix.arch }})
26+
name: (${{ matrix.os_prefix }}/${{ matrix.arch }}) Create Processing Build
1127
runs-on: ${{ matrix.os }}
12-
permissions:
13-
contents: write
28+
needs: test
1429
strategy:
1530
fail-fast: false
1631
matrix:
1732
include:
1833
- os: ubuntu-24.04-arm
1934
os_prefix: linux
2035
arch: aarch64
36+
binary: processing*.snap
2137
- os: ubuntu-latest
2238
os_prefix: linux
2339
arch: x64
40+
binary: processing*.snap
2441
- os: windows-latest
2542
os_prefix: windows
2643
arch: x64
44+
binary: msi/Processing-*.msi
2745
- os: macos-latest
2846
os_prefix: macos
2947
arch: x64
48+
binary: dmg/Processing-*.dmg
3049
- os: macos-latest
3150
os_prefix: macos
3251
arch: aarch64
52+
binary: dmg/Processing-*.dmg
3353
steps:
54+
- name: Install Snapcraft
55+
if: runner.os == 'Linux'
56+
uses: samuelmeuli/action-snapcraft@v3
57+
- name: Install LXD
58+
if: runner.os == 'Linux'
59+
uses: canonical/setup-lxd@main
60+
3461
- name: Checkout Repository
3562
uses: actions/checkout@v4
3663
- name: Install Java
@@ -41,32 +68,13 @@ jobs:
4168
architecture: ${{ matrix.arch }}
4269
- name: Setup Gradle
4370
uses: gradle/actions/setup-gradle@v4
44-
- name: Install Snapcraft
45-
if: runner.os == 'Linux'
46-
uses: samuelmeuli/action-snapcraft@v3
47-
- name: Install LXD
48-
if: runner.os == 'Linux'
49-
uses: canonical/setup-lxd@main
71+
5072
- name: Build with Gradle
5173
run: ./gradlew packageDistributionForCurrentOS
52-
- name: Add instructions
53-
if: ${{ matrix.os_prefix == 'macos' }}
54-
run: |
55-
echo "run 'xattr -d com.apple.quarantine Processing-${version}.dmg' to remove the quarantine flag" > ./app/build/compose/binaries/main/dmg/INSTRUCTIONS_FOR_TESTING.txt
74+
5675
- name: Add artifact
5776
uses: actions/upload-artifact@v4
5877
with:
59-
name: processing-${{ github.ref_name }}-${{github.sha}}-${{ matrix.os_prefix }}-${{ matrix.arch }}-gradle
60-
path: |
61-
./app/build/compose/binaries/main/dmg/Processing-*.dmg
62-
./app/build/compose/binaries/main/dmg/INSTRUCTIONS_FOR_TESTING.txt
63-
./app/build/compose/binaries/main/msi/Processing-*.msi
64-
./app/build/compose/binaries/main/deb/processing*.deb
65-
retention-days: 1
66-
- name: Upload Snap
67-
uses: actions/upload-artifact@v4
68-
with:
69-
name: processing-${{ github.ref_name }}-${{github.sha}}-${{ matrix.os_prefix }}-${{ matrix.arch }}-snap
70-
path: |
71-
./app/build/compose/binaries/main/processing*.snap
78+
name: processing-${{ matrix.os_prefix }}-${{ matrix.arch }}-br_${{ github.ref_name }}
7279
retention-days: 1
80+
path: app/build/compose/binaries/main/${{ matrix.binary }}

.github/workflows/maven.yml

Lines changed: 0 additions & 37 deletions
This file was deleted.

.github/workflows/pull_request-gradle.yml

Lines changed: 35 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,32 +7,58 @@ on:
77
- main
88

99
jobs:
10-
build:
11-
name: Create Pull Request Build for ${{ matrix.os_prefix }} (${{ matrix.arch }})
10+
test:
11+
runs-on: ubuntu-latest
12+
name: Test Processing
13+
steps:
14+
- name: Checkout Repository
15+
uses: actions/checkout@v4
16+
- name: Install Java
17+
uses: actions/setup-java@v4
18+
with:
19+
java-version: '17'
20+
distribution: 'temurin'
21+
- name: Setup Gradle
22+
uses: gradle/actions/setup-gradle@v4
23+
24+
- name: Build with Gradle
25+
run: ./gradlew test
26+
build:
27+
name: (${{ matrix.os_prefix }}/${{ matrix.arch }}) Create Processing Build
1228
runs-on: ${{ matrix.os }}
13-
permissions:
14-
pull-requests: write
15-
contents: read
29+
needs: test
1630
strategy:
1731
fail-fast: false
1832
matrix:
1933
include:
2034
- os: ubuntu-24.04-arm
2135
os_prefix: linux
2236
arch: aarch64
37+
binary: processing*.snap
2338
- os: ubuntu-latest
2439
os_prefix: linux
2540
arch: x64
41+
binary: processing*.snap
2642
- os: windows-latest
2743
os_prefix: windows
2844
arch: x64
45+
binary: msi/Processing-*.msi
2946
- os: macos-latest
3047
os_prefix: macos
3148
arch: x64
49+
binary: dmg/Processing-*.dmg
3250
- os: macos-latest
3351
os_prefix: macos
3452
arch: aarch64
53+
binary: dmg/Processing-*.dmg
3554
steps:
55+
- name: Install Snapcraft
56+
if: runner.os == 'Linux'
57+
uses: samuelmeuli/action-snapcraft@v3
58+
- name: Install LXD
59+
if: runner.os == 'Linux'
60+
uses: canonical/setup-lxd@main
61+
3662
- name: Checkout Repository
3763
uses: actions/checkout@v4
3864
- name: Install Java
@@ -43,19 +69,13 @@ jobs:
4369
architecture: ${{ matrix.arch }}
4470
- name: Setup Gradle
4571
uses: gradle/actions/setup-gradle@v4
72+
4673
- name: Build with Gradle
4774
run: ./gradlew packageDistributionForCurrentOS
48-
- name: Add instructions
49-
if: ${{ matrix.os_prefix == 'macos' }}
50-
run: |
51-
echo "run 'xattr -d com.apple.quarantine Processing-${version}.dmg' to remove the quarantine flag" > ./app/build/compose/binaries/main/dmg/INSTRUCTIONS_FOR_TESTING.txt
75+
5276
- name: Add artifact
5377
uses: actions/upload-artifact@v4
5478
with:
55-
name: processing-pr${{ github.event.pull_request.number }}-${{github.sha}}-${{ matrix.os_prefix }}-${{ matrix.arch }}-gradle
56-
path: |
57-
./app/build/compose/binaries/main/dmg/Processing-*.dmg
58-
./app/build/compose/binaries/main/dmg/INSTRUCTIONS_FOR_TESTING.txt
59-
./app/build/compose/binaries/main/msi/Processing-*.msi
60-
./app/build/compose/binaries/main/deb/processing*.deb
79+
name: processing-${{ matrix.os_prefix }}-${{ matrix.arch }}-pr_${{ github.ref_name }}
6180
retention-days: 5
81+
path: app/build/compose/binaries/main/${{ matrix.binary }}

.github/workflows/release-gradle.yml

Lines changed: 27 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
echo "build_number=$BUILD_NUMBER" >> $GITHUB_OUTPUT
2323
echo "version=$VERSION" >> $GITHUB_OUTPUT
2424
publish:
25-
name: Publish Processing Core to Maven Central
25+
name: Publish Processing Libraries to Maven Central
2626
runs-on: ubuntu-latest
2727
needs: version
2828
steps:
@@ -35,6 +35,7 @@ jobs:
3535
java-version: 17
3636
- name: Setup Gradle
3737
uses: gradle/actions/setup-gradle@v4
38+
3839
- name: Build with Gradle
3940
run: ./gradlew publish
4041
env:
@@ -50,7 +51,7 @@ jobs:
5051
ORG_GRADLE_PROJECT_version: ${{ needs.version.outputs.version }}
5152
ORG_GRADLE_PROJECT_group: ${{ vars.PROCESSING_GROUP }}
5253
build:
53-
name: Publish Release for ${{ matrix.os_prefix }} (${{ matrix.arch }})
54+
name: (${{ matrix.os_prefix }}/(${{ matrix.arch }})) Create Processing Release
5455
runs-on: ${{ matrix.os }}
5556
needs: version
5657
permissions:
@@ -59,26 +60,42 @@ jobs:
5960
fail-fast: false
6061
matrix:
6162
include:
62-
# compiling for arm32 needs a self-hosted runner on Raspi OS (32-bit)
63-
- os: [self-hosted, linux, ARM]
63+
- os: ubuntu-24.04-arm
6464
os_prefix: linux
65-
arch: arm
65+
arch: aarch64
66+
binary: processing*.snap
6667
- os: ubuntu-latest
6768
os_prefix: linux
6869
arch: x64
70+
binary: processing*.snap
6971
- os: windows-latest
7072
os_prefix: windows
7173
arch: x64
74+
binary: msi/Processing-*.msi
7275
- os: macos-latest
7376
os_prefix: macos
7477
arch: x64
78+
binary: dmg/Processing-*.dmg
7579
- os: macos-latest
7680
os_prefix: macos
7781
arch: aarch64
78-
- os: macos-latest
79-
os_prefix: linux
80-
arch: aarch64
82+
binary: dmg/Processing-*.dmg
8183
steps:
84+
- name: Install Certificates for Code Signing
85+
if: runner.os == 'macOS'
86+
continue-on-error: true
87+
uses: apple-actions/import-codesign-certs@v3
88+
with:
89+
p12-file-base64: ${{ secrets.CERTIFICATES_P12 }}
90+
p12-password: ${{ secrets.CERTIFICATES_P12_PASSWORD }}
91+
92+
- name: Install Snapcraft
93+
if: runner.os == 'Linux'
94+
uses: samuelmeuli/action-snapcraft@v3
95+
- name: Install LXD
96+
if: runner.os == 'Linux'
97+
uses: canonical/setup-lxd@main
98+
8299
- name: Checkout Repository
83100
uses: actions/checkout@v4
84101
- name: Install Java
@@ -89,12 +106,7 @@ jobs:
89106
architecture: ${{ matrix.arch }}
90107
- name: Setup Gradle
91108
uses: gradle/actions/setup-gradle@v4
92-
# - name: Install Certificates for Code Signing
93-
# if: ${{ matrix.os_prefix == 'macos' }}
94-
# uses: apple-actions/import-codesign-certs@v3
95-
# with:
96-
# p12-file-base64: ${{ secrets.CERTIFICATES_P12 }}
97-
# p12-password: ${{ secrets.CERTIFICATES_P12_PASSWORD }}
109+
98110
- name: Build with Gradle
99111
run: ./gradlew packageDistributionForCurrentOS
100112
env:
@@ -105,9 +117,5 @@ jobs:
105117
uses: svenstaro/upload-release-action@v2
106118
with:
107119
repo_token: ${{ secrets.GITHUB_TOKEN }}
108-
file: |
109-
./app/build/compose/binaries/main/dmg/Processing-*.dmg
110-
./app/build/compose/binaries/main/dmg/INSTRUCTIONS_FOR_TESTING.txt
111-
./app/build/compose/binaries/main/msi/Processing-*.msi
112-
./app/build/compose/binaries/main/deb/processing*.deb
120+
file: app/build/compose/binaries/main/${{ matrix.binary }}
113121
file_glob: true

app/build.gradle.kts

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,17 +127,33 @@ tasks.register<Exec>("packageCustomDmg"){
127127
dmg.parentFile.deleteRecursively()
128128
dmg.parentFile.mkdirs()
129129

130+
val extra = mutableListOf<String>()
131+
132+
if(!compose.desktop.application.nativeDistributions.macOS.signing.sign.get()) {
133+
val content = """
134+
run 'xattr -d com.apple.quarantine Processing-${version}.dmg' to remove the quarantine flag
135+
""".trimIndent()
136+
val instructions = dmg.parentFile.resolve("INSTRUCTIONS.txt")
137+
instructions.writeText(content)
138+
extra.add("--add-file")
139+
extra.add("INSTRUCTIONS.txt")
140+
extra.add(instructions.path)
141+
extra.add("200")
142+
extra.add("25")
143+
}
144+
130145
commandLine("brew", "install", "--quiet", "create-dmg")
131146

132147
commandLine("create-dmg",
133148
"--volname", packageName,
134-
"--volicon", rootProject.file("build/macos/processing.icns"),
149+
"--volicon", file("macos/volume.icns"),
135150
"--background", file("macos/background.png"),
136151
"--icon", "$packageName.app", "200", "200",
137152
"--window-pos", "200", "200",
138153
"--window-size", "775", "485",
139154
"--app-drop-link", "500", "200",
140155
"--hide-extension", "$packageName.app",
156+
*extra.toTypedArray(),
141157
dmg,
142158
app
143159
)

app/macos/volume.icns

171 KB
Binary file not shown.

0 commit comments

Comments
 (0)