More marking.
[SquirrelJME.git] / .circleci / config.yml
blob8580dab2cf3875b4d503d79f5d95ba11ec1d1e98
1 # ---------------------------------------------------------------------------
2 # Multi-Phasic Applications: SquirrelJME
3 #     Copyright (C) Stephanie Gawroriski <xer@multiphasicapps.net>
4 #     Copyright (C) Multi-Phasic Applications <multiphasicapps.net>
5 # ---------------------------------------------------------------------------
6 # SquirrelJME is under the GNU General Public License v3, or later.
7 # See license.mkd for licensing and copyright information.
8 # ---------------------------------------------------------------------------
9 # DESCRIPTION: CircleCI Build Configuration
10 # SourceForge: squirreljme@frs.sourceforge.net
11 # SourceForge Root: /home/frs/project/squirreljme/AutoBuild/
12 # CircleCI Reference: https://circleci.com/docs/2.0/env-vars/
14 version: 2.1
16 executors:
17   build-on-linux-amd64:
18     #docker:
19     #  - image: debian:bookworm
20     machine:
21       image: ubuntu-2204:2024.01.1
22     resource_class: medium
23     environment:
24       # Allow Gradle to be fully cached
25       GRADLE_USER_HOME: ${CIRCLE_WORKING_DIRECTORY}/.gradle/home
27       # Fix Debian package install
28       DEBIAN_FRONTEND: noninteractive
29       NEEDRESTART_MODE: l
30       NEEDRESTART_SUSPEND: 1
32   build-on-linux-arm64:
33     #docker:
34     #  - image: debian:bookworm
35     machine:
36       image: ubuntu-2204:2024.01.1
37     resource_class: arm.medium
38     environment:
39       # Allow Gradle to be fully cached
40       GRADLE_USER_HOME: ${CIRCLE_WORKING_DIRECTORY}/.gradle/home
42       # Fix Debian package install
43       DEBIAN_FRONTEND: noninteractive
44       NEEDRESTART_MODE: l
45       NEEDRESTART_SUSPEND: 1
47   build-on-linux-riscv64:
48     machine: true
49     resource_class: squirreljme/squirreljme-linux-riscv64
51   # This is in the documentation but does not actually work, new feature?
52   #  build-on-windows:
53   #    windows:
54   #      name: win/default
55   #      shell: cmd.exe
56   #    resource_class: medium
57   #    environment:
58   #      # Use a reduced amount of memory to all the VMs so that it does not
59   #      # try grabbing all the memory that is available to the system.
60   #      JAVA_OPTS: -Xmx3g
62   build-on-macos:
63     machine: true
64     resource_class: squirreljme/squirreljme-macos-x86
66   build-on-macos-m1:
67     machine: true
68     resource_class: squirreljme/squirreljme-macos-m1
70   squirreljme-bundle:
71     machine: true
72     resource_class: squirreljme/bundle
74 orbs:
75   win: circleci/windows@5.0
77 # Parameters to simplify commands
78 parameters:
79   # Options to be used for any Gradle command, is faster this way
80   standard-gradle-options:
81     type: string
82     default: --console plain --continue --parallel --no-daemon --stacktrace
84   standard-exclusion:
85     type: string
86     default: -x testSpringCoat -x testSpringCoatRelease -x testSpringCoatDebug -x javadoc -x javadocJar -x sourcesJar -x markdownJavaDoc
88   # Standard build for systems
89   standard-build-options:
90     type: string
91     default: build testHosted <<pipeline.parameters.standard-exclusion>>
93   # Windows JDK versions
94   windows-jdk-base-dir:
95     type: string
96     default: jdk-11.0.23
97   windows-jdk-i386:
98     type: string
99     default: https://download.bell-sw.com/java/11.0.23+12/bellsoft-jdk11.0.23+12-windows-i586.zip
100   windows-jdk-amd64:
101     type: string
102     default: https://download.bell-sw.com/java/11.0.23+12/bellsoft-jdk11.0.23+12-windows-amd64.zip
104 # Commands that are used by almost everything
105 commands:
106   # Save Gradle cache and such so subsequent builds are faster
107   persist-gradle:
108     steps:
109       - persist_to_workspace:
110           root: .
111           paths:
112             - '.gradle/*'
113             - 'build/*'
114             - '*/.gradle/*'
115             - '*/build/*'
116             - '*/*/build/*'
118   # Saving of test results, since this is duplicated for many OSes
119   save-test-results:
120     parameters:
121       where:
122         type: string
123       os:
124         type: string
125       vm:
126         type: string
127       shell:
128         type: string
129         default: "/bin/bash"
130       home:
131         type: string
132         default: ./.no-persist/
133       find:
134         type: string
135         default: find
136       store-home:
137         type: string
138         default: ./.no-persist/
139     steps:
140       - run:
141           shell: <<parameters.shell>>
142           name: Save test results
143           command: |
144             mkdir -p "<<parameters.home>>/test-results/junit-<<parameters.os>>-<<parameters.where>>/"
145             <<parameters.find>> . -type f -regex '.*/'"<<parameters.where>>"'/junit/.*\.xml' -exec cp {} "<<parameters.home>>/test-results/junit-<<parameters.os>>-<<parameters.where>>/" \;
146           when: always
147       - run:
148           shell: <<parameters.shell>>
149           name: Save test results
150           command: |
151             mkdir -p "<<parameters.home>>/test-results/csv-<<parameters.os>>-<<parameters.where>>/"
152             <<parameters.find>> . -type f -regex '.*/'"<<parameters.where>>"'/csv/.*\.csv' -exec cp {} "<<parameters.home>>/test-results/csv-<<parameters.os>>-<<parameters.where>>/" \;
153           when: always
154       - run:
155           shell: <<parameters.shell>>
156           name: Save snapshots
157           command: |
158             mkdir -p "<<parameters.home>>/test-results/nps-<<parameters.vm>>-<<parameters.os>>-<<parameters.where>>/"
159             <<parameters.find>> . -type f -regex '.*/'"<<parameters.where>>"'/nps/.*\.nps' -exec cp {} "<<parameters.home>>/test-results/nps-<<parameters.vm>>-<<parameters.os>>-<<parameters.where>>/" \;
160           when: always
161       - store_test_results:
162           path: <<parameters.store-home>>/test-results
163       - store_artifacts:
164           path: <<parameters.store-home>>/test-results
166   # Standard apt-get install
167   linux-debian-apt-get-install:
168     parameters:
169       packages:
170         type: string
171     steps:
172       - run:
173           name: Install packages
174           environment:
175             DEBIAN_FRONTEND: noninteractive
176             NEEDRESTART_MODE: l
177             NEEDRESTART_SUSPEND: 1
178           command: |
179             sudo apt-get install -y --no-install-recommends <<parameters.packages>>
181   # Standard apt-get install, optional
182   linux-debian-apt-get-install-optional:
183     parameters:
184       packages:
185         type: string
186       look:
187         type: string
188     steps:
189       - run:
190           name: Install packages (optional)
191           environment:
192             DEBIAN_FRONTEND: noninteractive
193             NEEDRESTART_MODE: l
194             NEEDRESTART_SUSPEND: 1
195           command: |
196             if ! which "<<parameters.look>>"; then sudo apt-get install -y --no-install-recommends <<parameters.packages>> || echo "Failed, but ignoring..."; fi
198   # Install standard packages in Debian/Ubuntu
199   linux-install-required:
200     steps:
201       - run:
202           name: Install Sudo
203           environment:
204             DEBIAN_FRONTEND: noninteractive
205             NEEDRESTART_MODE: l
206             NEEDRESTART_SUSPEND: 1
207           command: apt-get update -y && apt-get -yqq install sudo || echo "Failed, but ignoring..."
208       - run:
209           name: Update package lists
210           environment:
211             DEBIAN_FRONTEND: noninteractive
212             NEEDRESTART_MODE: l
213             NEEDRESTART_SUSPEND: 1
214           command: sudo apt-get update -y
215       - linux-debian-apt-get-install:
216           packages: cmake build-essential curl wget gcc g++ make clang git openssh-client
217       - linux-debian-apt-get-install-optional:
218           look: javac
219           packages: openjdk-17-jdk
220       - linux-debian-apt-get-install-optional:
221           look: javac
222           packages: openjdk-11-jdk
223       - linux-debian-apt-get-install-optional:
224           look: javac
225           packages: openjdk-8-jdk
226       - linux-debian-apt-get-install-optional:
227           look: javac
228           packages: openjdk-7-jdk
230   # Install required packages on Windows
231   windows-install-required:
232     steps:
233       - run:
234           name: Install CMake
235           shell: cmd.exe
236           command: choco install cmake -y
237       - run:
238           name: Install Mingw-w64
239           shell: cmd.exe
240           command: choco install mingw -y
242   # Windows JDK Install
243   windows-install-jdk:
244     parameters:
245       jdk-url:
246         type: string
247     steps:
248       - run:
249           shell: bash.exe
250           name: Download Older JDK
251           command: curl -o /c/users/circleci/jdk.zip <<parameters.jdk-url>>
252       - run:
253           shell: bash.exe
254           name: Extract Older JDK
255           command: unzip /c/users/circleci/jdk.zip
256       - persist_to_workspace:
257           root: .
258           paths:
259             - <<pipeline.parameters.windows-jdk-base-dir>>/
261   # Install required packages on macOS
262   macos-install-required:
263     steps:
264       - run:
265           # Only OpenJDK is required, Gradle always uses Gradle wrapper so
266           # we do not need that... also CMake as well for native code
267           name: Install Dependencies
268           command: brew install openjdk@11 coreutils cmake
270   # Install what is required by Flatpak
271   flatpak-install-required:
272     steps:
273       - linux-debian-apt-get-install:
274           packages: flatpak flatpak-builder
275       - run:
276           name: Register Flathub
277           command: flatpak remote-add --user flathub https://dl.flathub.org/repo/flathub.flatpakrepo
278       - run:
279           name: Flatpak FreeDesktop Platform
280           command: flatpak install --user -y --noninteractive flathub org.freedesktop.Platform//23.08
281       - run:
282           name: Flatpak FreeDesktop SDK
283           command: flatpak install --user -y --noninteractive flathub org.freedesktop.Sdk//23.08
284       - run:
285           name: Flatpak OpenJDK
286           command: flatpak install --user -y --noninteractive flathub runtime/org.freedesktop.Sdk.Extension.openjdk11//23.08
288   # Flatpak Common Build Rules
289   flatpak-common-build:
290     parameters:
291       arch:
292         type: string
293     steps:
294       - run:
295           name: Flatpak Build and Install
296           command: flatpak-builder --user --install --install-deps-from=flathub --allow-missing-runtimes --force-clean build-dir cc.squirreljme.SquirrelJME.yml
297       - run:
298           name: Flatpak Bundle
299           command: flatpak build-bundle $HOME/.local/share/flatpak/repo squirreljme-0.3.0-<<parameters.arch>>.flatpak cc.squirreljme.SquirrelJME
300       - store_artifacts:
301           path: squirreljme-0.3.0-<<parameters.arch>>.flatpak
302           destination: squirreljme-0.3.0-<<parameters.arch>>.flatpak
304   # Common Build for Standalone (UNIX)
305   standalone-unix-common-build:
306     steps:
307       - run:
308           name: Construct Standalone
309           command: ./gradlew :emulators:standalone:shadowJar <<pipeline.parameters.standard-gradle-options>>
310       - run:
311           name: Remove distracting JAR, if any
312           command: rm emulators/standalone/build/libs/standalone-*.jar
313       - store_artifacts:
314           path: emulators/standalone/build/libs/
315           destination: .
317 jobs:
318   ################################## BUNDLE ##################################
319   bundle:
320     executor: squirreljme-bundle
321     steps:
322       - run:
323           name: Delete working directory
324           command: rm -rf /home/circleci/work/co || echo "Ignoring..."
325       - run:
326           name: Setup working directory
327           command: mkdir -p /home/circleci/work/co || echo "Ignoring..."
328       - run:
329           name: Open repository
330           working_directory: /home/circleci/work/co
331           command: fossil open /home/repo/squirreljme.fossil --force
332       - run:
333           name: Checkout trunk
334           working_directory: /home/circleci/work/co
335           command: fossil checkout trunk || echo "Ignoring..."
336       - run:
337           name: Updating checkout
338           working_directory: /home/circleci/work/co
339           command: fossil update || echo "Ignoring..."
340       - run:
341           name: Ensure build is clean
342           working_directory: /home/circleci/work/co
343           command: ./gradlew clean --parallel
344       - run:
345           name: Run CI/CD Bundle Tasks
346           working_directory: /home/circleci/work/co
347           command: ./gradlew :tools:cicd-release-bundle:run --parallel
348       - run:
349           name: Close repository
350           working_directory: /home/circleci/work/co
351           command: fossil close --force
352           when: always
354   ################################## WINDOWS #################################
355   build_windows_i386_setup:
356     executor:
357       name: win/default
358       shell: cmd.exe
359       size: medium
360     steps:
361       - windows-install-jdk:
362           jdk-url: <<pipeline.parameters.windows-jdk-i386>>
364   build_windows_i386:
365     executor:
366       name: win/default
367       shell: cmd.exe
368       size: medium
369     environment:
370       # Use older JDK for CircleCI
371       JAVA_HOME: c:/users/circleci/project/<<pipeline.parameters.windows-jdk-base-dir>>/
372     steps:
373       - checkout
374       - attach_workspace:
375           at: .
376       - windows-install-required
377       - run:
378           shell: cmd.exe
379           name: Gradle Build and Test
380           # According to documentation, Gradle on Windows has trouble and tries
381           # to make way too many workers which causes extreme resource.
382           # contention --max-workers=2
383           command: gradlew <<pipeline.parameters.standard-build-options>> <<pipeline.parameters.standard-exclusion>> <<pipeline.parameters.standard-gradle-options>>
384           no_output_timeout: 60m
385       - persist-gradle
386       - save-test-results:
387           where: "vm-test-hosted-debug"
388           os: "windows"
389           vm: "hosted"
390           shell: bash.exe
391           find: /usr/bin/find
392           home: "/c/users/circleci/"
393           store-home: "c:/users/circleci/"
394       - save-test-results:
395           where: "vm-test-hosted-release"
396           os: "windows"
397           vm: "hosted"
398           shell: bash.exe
399           find: /usr/bin/find
400           home: "/c/users/circleci/"
401           store-home: "c:/users/circleci/"
403   build_windows_i386_standalone:
404     executor:
405       name: win/default
406       shell: cmd.exe
407       size: medium
408     environment:
409       # Use older JDK for CircleCI
410       JAVA_HOME: c:/users/circleci/project/<<pipeline.parameters.windows-jdk-base-dir>>/
411     steps:
412       - checkout
413       - attach_workspace:
414           at: .
415       - windows-install-required
416       - run:
417           shell: bash.exe
418           name: Construct Standalone
419           command: ./gradlew :emulators:standalone:shadowJar <<pipeline.parameters.standard-gradle-options >>
420       - run:
421           shell: bash.exe
422           name: Remove distracting JAR, if any
423           command: rm emulators/standalone/build/libs/standalone-*.jar
424       - store_artifacts:
425           path: emulators/standalone/build/libs/
426           destination: .
428   build_windows_amd64_setup:
429     executor:
430       name: win/default
431       shell: cmd.exe
432       size: medium
433     environment:
434       # Use older JDK for CircleCI
435       JAVA_HOME: c:/users/circleci/project/<<pipeline.parameters.windows-jdk-base-dir>>/
436     steps:
437       - windows-install-jdk:
438           jdk-url: <<pipeline.parameters.windows-jdk-amd64>>
440   build_windows_amd64:
441     executor:
442       name: win/default
443       shell: cmd.exe
444       size: medium
445     environment:
446       # Use a reduced amount of memory to all the VMs so that it does not
447       # try grabbing all the memory that is available to the system.
448       JAVA_OPTS: -Xmx3g
450       # Use older JDK for CircleCI
451       JAVA_HOME: c:/users/circleci/project/<<pipeline.parameters.windows-jdk-base-dir>>/
452     steps:
453       - checkout
454       - attach_workspace:
455           at: .
456       - windows-install-required
457       - run:
458           shell: cmd.exe
459           name: Gradle Build and Test
460           # According to documentation, Gradle on Windows has trouble and tries
461           # to make way too many workers which causes extreme resource.
462           # contention --max-workers=2
463           command: gradlew <<pipeline.parameters.standard-build-options>> <<pipeline.parameters.standard-exclusion>> <<pipeline.parameters.standard-gradle-options>>
464           no_output_timeout: 60m
465       - persist-gradle
466       - save-test-results:
467           where: "vm-test-hosted-debug"
468           os: "windows"
469           vm: "hosted"
470           shell: bash.exe
471           find: /usr/bin/find
472           home: "/c/users/circleci/"
473           store-home: "c:/users/circleci/"
474       - save-test-results:
475           where: "vm-test-hosted-release"
476           os: "windows"
477           vm: "hosted"
478           shell: bash.exe
479           find: /usr/bin/find
480           home: "/c/users/circleci/"
481           store-home: "c:/users/circleci/"
483   build_windows_amd64_standalone:
484     executor:
485       name: win/default
486       shell: cmd.exe
487       size: medium
488     environment:
489       # Use a reduced amount of memory to all the VMs so that it does not
490       # try grabbing all the memory that is available to the system.
491       JAVA_OPTS: -Xmx3g
493       # Use older JDK for CircleCI
494       JAVA_HOME: c:/users/circleci/project/<<pipeline.parameters.windows-jdk-base-dir>>/
495     steps:
496       - checkout
497       - attach_workspace:
498           at: .
499       - windows-install-required
500       - run:
501           shell: bash.exe
502           name: Construct Standalone
503           command: ./gradlew :emulators:standalone:shadowJar <<pipeline.parameters.standard-gradle-options >>
504       - run:
505           shell: bash.exe
506           name: Remove distracting JAR, if any
507           command: rm emulators/standalone/build/libs/standalone-*.jar
508       - store_artifacts:
509           path: emulators/standalone/build/libs/
510           destination: .
512   ################################# MAC OS X #################################
513   build_macosx_amd64:
514     executor: build-on-macos
515     steps:
516       - checkout
517       - run:
518           name: Gradle Build and Test
519           command: timeout --foreground 60m ./gradlew <<pipeline.parameters.standard-build-options>> <<pipeline.parameters.standard-exclusion>> <<pipeline.parameters.standard-gradle-options>>
520           no_output_timeout: 60m
521       - persist-gradle
522       - save-test-results:
523           where: "vm-test-hosted-debug"
524           os: "macosx"
525           vm: "hosted"
526       - save-test-results:
527           where: "vm-test-hosted-release"
528           os: "macosx"
529           vm: "hosted"
530   build_macosx_arm64:
531     executor: build-on-macos-m1
532     steps:
533       - checkout
534       - run:
535           name: Gradle Build and Test
536           command: timeout --foreground 60m ./gradlew <<pipeline.parameters.standard-build-options>> <<pipeline.parameters.standard-exclusion>> <<pipeline.parameters.standard-gradle-options>>
537           no_output_timeout: 60m
538       - persist-gradle
539       - save-test-results:
540           where: "vm-test-hosted-debug"
541           os: "macosx-m1"
542           vm: "hosted"
543       - save-test-results:
544           where: "vm-test-hosted-release"
545           os: "macosx-m1"
546           vm: "hosted"
548   build_macosx_amd64_standalone:
549     executor: build-on-macos
550     steps:
551       - checkout
552       - attach_workspace:
553           at: .
554       - standalone-unix-common-build
555   build_macosx_arm64_standalone:
556     executor: build-on-macos-m1
557     steps:
558       - checkout
559       - attach_workspace:
560           at: .
561       - standalone-unix-common-build
563   ################################### LINUX ##################################
564   # Linux AMD64
565   build_linux_amd64:
566     executor: build-on-linux-amd64
567     steps:
568       - checkout
569       - linux-install-required
570       - run:
571           name: Gradle Build and Test
572           command: timeout --foreground 60m ./gradlew <<pipeline.parameters.standard-build-options>> <<pipeline.parameters.standard-exclusion>> <<pipeline.parameters.standard-gradle-options>>
573           no_output_timeout: 60m
574       - save-test-results:
575           where: "vm-test-hosted-debug"
576           os: "linux-amd64"
577           vm: "hosted"
578       - save-test-results:
579           where: "vm-test-hosted-release"
580           os: "linux-amd64"
581           vm: "hosted"
582       - persist-gradle
583   build_linux_amd64_standalone:
584     executor: build-on-linux-amd64
585     steps:
586       - checkout
587       - linux-install-required
588       - attach_workspace:
589           at: .
590       - standalone-unix-common-build
591   build_linux_amd64_standalone_flatpak:
592     executor: build-on-linux-amd64
593     steps:
594       - checkout
595       - linux-install-required
596       - flatpak-install-required
597       - flatpak-common-build:
598           arch: amd64
600   # Linux ARM64
601   build_linux_arm64:
602     executor: build-on-linux-arm64
603     steps:
604       - checkout
605       - linux-install-required
606       - run:
607           name: Gradle Build and Test
608           command: timeout --foreground 60m ./gradlew <<pipeline.parameters.standard-build-options>> <<pipeline.parameters.standard-exclusion>> <<pipeline.parameters.standard-gradle-options>>
609           no_output_timeout: 60m
610       - save-test-results:
611           where: "vm-test-hosted-debug"
612           os: "linux-arm64"
613           vm: "hosted"
614       - save-test-results:
615           where: "vm-test-hosted-release"
616           os: "linux-arm64"
617           vm: "hosted"
618       - persist-gradle
619   build_linux_arm64_standalone:
620     executor: build-on-linux-arm64
621     steps:
622       - checkout
623       - linux-install-required
624       - attach_workspace:
625           at: .
626       - standalone-unix-common-build
627   build_linux_arm64_standalone_flatpak:
628     executor: build-on-linux-arm64
629     steps:
630       - checkout
631       - linux-install-required
632       - flatpak-install-required
633       - flatpak-common-build:
634           arch: arm64
636   # Linux RISC-V 64-bit
637   build_linux_riscv64:
638     executor: build-on-linux-riscv64
639     steps:
640       - checkout
641       - run:
642           name: Gradle Build and Test
643           command: timeout --foreground 120m ./gradlew <<pipeline.parameters.standard-build-options>> <<pipeline.parameters.standard-exclusion>> <<pipeline.parameters.standard-gradle-options>>
644           no_output_timeout: 120m
645       - save-test-results:
646           where: "vm-test-hosted-debug"
647           os: "linux-arm64"
648           vm: "hosted"
649       - save-test-results:
650           where: "vm-test-hosted-release"
651           os: "linux-arm64"
652           vm: "hosted"
653       - persist-gradle
654   build_linux_riscv64_standalone:
655     executor: build-on-linux-riscv64
656     steps:
657       - checkout
658       - attach_workspace:
659           at: .
660       - standalone-unix-common-build
662   ### OSS SonaType Nexus
663   sonatype_publish:
664     executor: build-on-linux-amd64
665     steps:
666       - checkout
667       - linux-install-required
668       - attach_workspace:
669           at: .
670       - run:
671           name: Publish to OSS SonaType
672           command: ./gradlew publishMavenPublicationToMavenRepository <<pipeline.parameters.standard-gradle-options>> || circleci-agent step halt
674   ### SpringCoat
675   test_springcoat_debug:
676     executor: build-on-linux-amd64
677     steps:
678       - checkout
679       - linux-install-required
680       - attach_workspace:
681           at: .
682       - run:
683           name: SpringCoat Tests
684           command: timeout --foreground 60m ./gradlew testSpringCoatDebug <<pipeline.parameters.standard-gradle-options>>
685           no_output_timeout: 60m
686       - save-test-results:
687           where: "vm-test-springcoat-debug"
688           os: "linux"
689           vm: "springcoat"
690   test_springcoat_release:
691     executor: build-on-linux-amd64
692     steps:
693       - checkout
694       - linux-install-required
695       - attach_workspace:
696           at: .
697       - run:
698           name: SpringCoat Tests
699           command: timeout --foreground 60m ./gradlew testSpringCoatRelease <<pipeline.parameters.standard-gradle-options>>
700           no_output_timeout: 60m
701       - save-test-results:
702           where: "vm-test-springcoat-release"
703           os: "linux"
704           vm: "springcoat"
706   ################################### USERS ##################################
707   export_user_guide:
708     executor: build-on-linux-amd64
709     steps:
710       - checkout
711       - linux-install-required
712       - run:
713           name: Checkout Wiki
714           command: git clone git@github.com:SquirrelJME/SquirrelJME.wiki.git /tmp/wiki
715       - run:
716           name: Wikify
717           command: .circleci/squirreljme-wikify-user-guide.sh "$(pwd)" "/tmp/wiki"
718       - run:
719           name: Update Git User
720           command: |
721             cd "/tmp/wiki" && git config user.name "SquirrelJME Automation" && git config user.email "xerthesquirrel+squirreljme@gmail.com"
722       - run:
723           name: Commit changes
724           command: |
725             cd "/tmp/wiki" && git commit -m "Synchronize User-Guide" || echo "Ignoring commit."
726       - add_ssh_keys:
727           fingerprints:
728             - "26:b8:ae:4d:53:64:4c:6a:59:3d:a6:60:44:90:9d:6c"
729       - run:
730           name: Push changes
731           command: |
732             cd "/tmp/wiki" && git push
734   ################################ CONSTRUCTION ###############################
735   # Runs the `testJar` task so any operations following this will run faster
736   # when they need to use these JARs
737   construct_testJars:
738     executor: build-on-linux-amd64
739     steps:
740       - checkout
741       - linux-install-required
742       - attach_workspace:
743           at: .
744       - run:
745           name: Construct Test JARs
746           command: ./gradlew testJar <<pipeline.parameters.standard-gradle-options>>
747       - persist-gradle
749 workflows:
750   version: 2
751   tests:
752     jobs:
753       ############################# STANDARD TESTS ############################
754       # AMD64
755       - build_linux_amd64
756       - test_springcoat_debug:
757           requires:
758             - construct_testJars
759           filters:
760             branches:
761               only:
762                 - trunk
763       - test_springcoat_release:
764           requires:
765             - construct_testJars
766           filters:
767             branches:
768               only:
769                 - trunk
770       - build_linux_amd64_standalone:
771           requires:
772             - build_linux_amd64
773           filters:
774             branches:
775               only:
776                 - trunk
777       - build_linux_amd64_standalone_flatpak:
778           requires:
779             - build_linux_amd64
780           filters:
781             branches:
782               only:
783                 - trunk
785       # ARM64
786       - build_linux_arm64:
787           filters:
788             branches:
789               only:
790                 - trunk
791       - build_linux_arm64_standalone:
792           requires:
793             - build_linux_arm64
794           filters:
795             branches:
796               only:
797                 - trunk
798       - build_linux_arm64_standalone_flatpak:
799           requires:
800             - build_linux_arm64
801           filters:
802             branches:
803               only:
804                 - trunk
806       # RISC-V 64-bit
807 #      - build_linux_riscv64
808 #      - build_linux_riscv64_standalone:
809 #          requires:
810 #            - build_linux_riscv64
811 #          filters:
812 #            branches:
813 #              only:
814 #                - trunk
816       # Windows 32-bit
817       - build_windows_i386_setup:
818           filters:
819             branches:
820               only:
821                 - trunk
822       - build_windows_i386:
823           requires:
824             - build_windows_i386_setup
825           filters:
826             branches:
827               only:
828                 - trunk
829       - build_windows_i386_standalone:
830           requires:
831             - build_windows_i386
832           filters:
833             branches:
834               only:
835                 - trunk
837       # Windows 64-bit
838       - build_windows_amd64_setup
839       - build_windows_amd64:
840           requires:
841             - build_windows_amd64_setup
842       - build_windows_amd64_standalone:
843           requires:
844             - build_windows_amd64
845           filters:
846             branches:
847               only:
848                 - trunk
850       # Mac OS X runs decently however the jobs for it have a higher cost, so
851       # only perform builds and tests for trunk to lower costs.
852       # Currently, I have an overabundance of credits...
853       - build_macosx_amd64
854       - build_macosx_arm64
855       - build_macosx_amd64_standalone:
856           requires:
857             - build_macosx_amd64
858           filters:
859             branches:
860               only:
861                 - trunk
862       - build_macosx_arm64_standalone:
863           requires:
864             - build_macosx_arm64
865           filters:
866             branches:
867               only:
868                 - trunk
870       # Publishing to OSS Sonatype Nexus (https://oss.sonatype.org)
871       - sonatype_publish:
872           requires:
873             - build_linux_amd64
874           filters:
875             branches:
876               only:
877                 - trunk
878                 - wip-centralpublish
880       ###################### LIBRARY AND ROM CONSTRUCTION #####################
881       - construct_testJars:
882           requires:
883             - build_linux_amd64
884           filters:
885             branches:
886               only:
887                 - trunk
889       ############################## DEPLOYMENT ##############################
890       - bundle:
891           requires:
892             - build_linux_amd64_standalone
893             - build_linux_amd64_standalone_flatpak
894             - build_linux_arm64_standalone_flatpak
895             - build_windows_i386_standalone
896             - build_windows_amd64_standalone
897             - build_macosx_amd64_standalone
898             - build_macosx_arm64_standalone
899           filters:
900             branches:
901               only:
902                 - trunk
904   #################### TASKS TO INCREASE USER FRIENDLINESS ####################
905   friendliness:
906     jobs:
907       - export_user_guide:
908           filters:
909             branches:
910               only:
911                 - trunk
912                 - wip-userguide