Use sub-directory that will be clean to correct building.
[SquirrelJME.git] / .circleci / config.yml
blobea83c993c35a34a6f1c8a080eba3314b81a6cfb0
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: Setup working directory
324           command: rm -rf co; mkdir -p co
325       - run:
326           name: Open repository
327           working_directory: co
328           command: fossil open /home/repo/squirreljme.fossil --force
329       - run:
330           name: Checkout trunk
331           working_directory: co
332           command: fossil checkout trunk || echo "Ignoring..."
333       - run:
334           name: Updating checkout
335           working_directory: co
336           command: fossil update || echo "Ignoring..."
337       - run:
338           name: Ensure build is clean
339           working_directory: co
340           comand: ./gradlew clean --parallel
341       - run:
342           name: Run CI/CD Bundle Tasks
343           working_directory: co
344           command: ./gradlew :tools:cicd-release-bundle:run --parallel
345       - run:
346           name: Close repository
347           working_directory: co
348           command: fossil close --force
349           when: always
351   ################################## WINDOWS #################################
352   build_windows_i386_setup:
353     executor:
354       name: win/default
355       shell: cmd.exe
356       size: medium
357     steps:
358       - windows-install-jdk:
359           jdk-url: <<pipeline.parameters.windows-jdk-i386>>
361   build_windows_i386:
362     executor:
363       name: win/default
364       shell: cmd.exe
365       size: medium
366     environment:
367       # Use older JDK for CircleCI
368       JAVA_HOME: c:/users/circleci/project/<<pipeline.parameters.windows-jdk-base-dir>>/
369     steps:
370       - checkout
371       - attach_workspace:
372           at: .
373       - windows-install-required
374       - run:
375           shell: cmd.exe
376           name: Gradle Build and Test
377           # According to documentation, Gradle on Windows has trouble and tries
378           # to make way too many workers which causes extreme resource.
379           # contention --max-workers=2
380           command: gradlew <<pipeline.parameters.standard-build-options>> <<pipeline.parameters.standard-exclusion>> <<pipeline.parameters.standard-gradle-options>>
381           no_output_timeout: 60m
382       - persist-gradle
383       - save-test-results:
384           where: "vm-test-hosted-debug"
385           os: "windows"
386           vm: "hosted"
387           shell: bash.exe
388           find: /usr/bin/find
389           home: "/c/users/circleci/"
390           store-home: "c:/users/circleci/"
391       - save-test-results:
392           where: "vm-test-hosted-release"
393           os: "windows"
394           vm: "hosted"
395           shell: bash.exe
396           find: /usr/bin/find
397           home: "/c/users/circleci/"
398           store-home: "c:/users/circleci/"
400   build_windows_i386_standalone:
401     executor:
402       name: win/default
403       shell: cmd.exe
404       size: medium
405     environment:
406       # Use older JDK for CircleCI
407       JAVA_HOME: c:/users/circleci/project/<<pipeline.parameters.windows-jdk-base-dir>>/
408     steps:
409       - checkout
410       - attach_workspace:
411           at: .
412       - windows-install-required
413       - run:
414           shell: bash.exe
415           name: Construct Standalone
416           command: ./gradlew :emulators:standalone:shadowJar <<pipeline.parameters.standard-gradle-options >>
417       - run:
418           shell: bash.exe
419           name: Remove distracting JAR, if any
420           command: rm emulators/standalone/build/libs/standalone-*.jar
421       - store_artifacts:
422           path: emulators/standalone/build/libs/
423           destination: .
425   build_windows_amd64_setup:
426     executor:
427       name: win/default
428       shell: cmd.exe
429       size: medium
430     environment:
431       # Use older JDK for CircleCI
432       JAVA_HOME: c:/users/circleci/project/<<pipeline.parameters.windows-jdk-base-dir>>/
433     steps:
434       - windows-install-jdk:
435           jdk-url: <<pipeline.parameters.windows-jdk-amd64>>
437   build_windows_amd64:
438     executor:
439       name: win/default
440       shell: cmd.exe
441       size: medium
442     environment:
443       # Use a reduced amount of memory to all the VMs so that it does not
444       # try grabbing all the memory that is available to the system.
445       JAVA_OPTS: -Xmx3g
447       # Use older JDK for CircleCI
448       JAVA_HOME: c:/users/circleci/project/<<pipeline.parameters.windows-jdk-base-dir>>/
449     steps:
450       - checkout
451       - attach_workspace:
452           at: .
453       - windows-install-required
454       - run:
455           shell: cmd.exe
456           name: Gradle Build and Test
457           # According to documentation, Gradle on Windows has trouble and tries
458           # to make way too many workers which causes extreme resource.
459           # contention --max-workers=2
460           command: gradlew <<pipeline.parameters.standard-build-options>> <<pipeline.parameters.standard-exclusion>> <<pipeline.parameters.standard-gradle-options>>
461           no_output_timeout: 60m
462       - persist-gradle
463       - save-test-results:
464           where: "vm-test-hosted-debug"
465           os: "windows"
466           vm: "hosted"
467           shell: bash.exe
468           find: /usr/bin/find
469           home: "/c/users/circleci/"
470           store-home: "c:/users/circleci/"
471       - save-test-results:
472           where: "vm-test-hosted-release"
473           os: "windows"
474           vm: "hosted"
475           shell: bash.exe
476           find: /usr/bin/find
477           home: "/c/users/circleci/"
478           store-home: "c:/users/circleci/"
480   build_windows_amd64_standalone:
481     executor:
482       name: win/default
483       shell: cmd.exe
484       size: medium
485     environment:
486       # Use a reduced amount of memory to all the VMs so that it does not
487       # try grabbing all the memory that is available to the system.
488       JAVA_OPTS: -Xmx3g
490       # Use older JDK for CircleCI
491       JAVA_HOME: c:/users/circleci/project/<<pipeline.parameters.windows-jdk-base-dir>>/
492     steps:
493       - checkout
494       - attach_workspace:
495           at: .
496       - windows-install-required
497       - run:
498           shell: bash.exe
499           name: Construct Standalone
500           command: ./gradlew :emulators:standalone:shadowJar <<pipeline.parameters.standard-gradle-options >>
501       - run:
502           shell: bash.exe
503           name: Remove distracting JAR, if any
504           command: rm emulators/standalone/build/libs/standalone-*.jar
505       - store_artifacts:
506           path: emulators/standalone/build/libs/
507           destination: .
509   ################################# MAC OS X #################################
510   build_macosx_amd64:
511     executor: build-on-macos
512     steps:
513       - checkout
514       - run:
515           name: Gradle Build and Test
516           command: timeout --foreground 60m ./gradlew <<pipeline.parameters.standard-build-options>> <<pipeline.parameters.standard-exclusion>> <<pipeline.parameters.standard-gradle-options>>
517           no_output_timeout: 60m
518       - persist-gradle
519       - save-test-results:
520           where: "vm-test-hosted-debug"
521           os: "macosx"
522           vm: "hosted"
523       - save-test-results:
524           where: "vm-test-hosted-release"
525           os: "macosx"
526           vm: "hosted"
527   build_macosx_arm64:
528     executor: build-on-macos-m1
529     steps:
530       - checkout
531       - run:
532           name: Gradle Build and Test
533           command: timeout --foreground 60m ./gradlew <<pipeline.parameters.standard-build-options>> <<pipeline.parameters.standard-exclusion>> <<pipeline.parameters.standard-gradle-options>>
534           no_output_timeout: 60m
535       - persist-gradle
536       - save-test-results:
537           where: "vm-test-hosted-debug"
538           os: "macosx-m1"
539           vm: "hosted"
540       - save-test-results:
541           where: "vm-test-hosted-release"
542           os: "macosx-m1"
543           vm: "hosted"
545   build_macosx_amd64_standalone:
546     executor: build-on-macos
547     steps:
548       - checkout
549       - attach_workspace:
550           at: .
551       - standalone-unix-common-build
552   build_macosx_arm64_standalone:
553     executor: build-on-macos-m1
554     steps:
555       - checkout
556       - attach_workspace:
557           at: .
558       - standalone-unix-common-build
560   ################################### LINUX ##################################
561   # Linux AMD64
562   build_linux_amd64:
563     executor: build-on-linux-amd64
564     steps:
565       - checkout
566       - linux-install-required
567       - run:
568           name: Gradle Build and Test
569           command: timeout --foreground 60m ./gradlew <<pipeline.parameters.standard-build-options>> <<pipeline.parameters.standard-exclusion>> <<pipeline.parameters.standard-gradle-options>>
570           no_output_timeout: 60m
571       - save-test-results:
572           where: "vm-test-hosted-debug"
573           os: "linux-amd64"
574           vm: "hosted"
575       - save-test-results:
576           where: "vm-test-hosted-release"
577           os: "linux-amd64"
578           vm: "hosted"
579       - persist-gradle
580   build_linux_amd64_standalone:
581     executor: build-on-linux-amd64
582     steps:
583       - checkout
584       - linux-install-required
585       - attach_workspace:
586           at: .
587       - standalone-unix-common-build
588   build_linux_amd64_standalone_flatpak:
589     executor: build-on-linux-amd64
590     steps:
591       - checkout
592       - linux-install-required
593       - flatpak-install-required
594       - flatpak-common-build:
595           arch: amd64
597   # Linux ARM64
598   build_linux_arm64:
599     executor: build-on-linux-arm64
600     steps:
601       - checkout
602       - linux-install-required
603       - run:
604           name: Gradle Build and Test
605           command: timeout --foreground 60m ./gradlew <<pipeline.parameters.standard-build-options>> <<pipeline.parameters.standard-exclusion>> <<pipeline.parameters.standard-gradle-options>>
606           no_output_timeout: 60m
607       - save-test-results:
608           where: "vm-test-hosted-debug"
609           os: "linux-arm64"
610           vm: "hosted"
611       - save-test-results:
612           where: "vm-test-hosted-release"
613           os: "linux-arm64"
614           vm: "hosted"
615       - persist-gradle
616   build_linux_arm64_standalone:
617     executor: build-on-linux-arm64
618     steps:
619       - checkout
620       - linux-install-required
621       - attach_workspace:
622           at: .
623       - standalone-unix-common-build
624   build_linux_arm64_standalone_flatpak:
625     executor: build-on-linux-arm64
626     steps:
627       - checkout
628       - linux-install-required
629       - flatpak-install-required
630       - flatpak-common-build:
631           arch: arm64
633   # Linux RISC-V 64-bit
634   build_linux_riscv64:
635     executor: build-on-linux-riscv64
636     steps:
637       - checkout
638       - run:
639           name: Gradle Build and Test
640           command: timeout --foreground 120m ./gradlew <<pipeline.parameters.standard-build-options>> <<pipeline.parameters.standard-exclusion>> <<pipeline.parameters.standard-gradle-options>>
641           no_output_timeout: 120m
642       - save-test-results:
643           where: "vm-test-hosted-debug"
644           os: "linux-arm64"
645           vm: "hosted"
646       - save-test-results:
647           where: "vm-test-hosted-release"
648           os: "linux-arm64"
649           vm: "hosted"
650       - persist-gradle
651   build_linux_riscv64_standalone:
652     executor: build-on-linux-riscv64
653     steps:
654       - checkout
655       - attach_workspace:
656           at: .
657       - standalone-unix-common-build
659   ### OSS SonaType Nexus
660   sonatype_publish:
661     executor: build-on-linux-amd64
662     steps:
663       - checkout
664       - linux-install-required
665       - attach_workspace:
666           at: .
667       - run:
668           name: Publish to OSS SonaType
669           command: ./gradlew publishMavenPublicationToMavenRepository <<pipeline.parameters.standard-gradle-options>> || circleci-agent step halt
671   ### SpringCoat
672   test_springcoat_debug:
673     executor: build-on-linux-amd64
674     steps:
675       - checkout
676       - linux-install-required
677       - attach_workspace:
678           at: .
679       - run:
680           name: SpringCoat Tests
681           command: timeout --foreground 60m ./gradlew testSpringCoatDebug <<pipeline.parameters.standard-gradle-options>>
682           no_output_timeout: 60m
683       - save-test-results:
684           where: "vm-test-springcoat-debug"
685           os: "linux"
686           vm: "springcoat"
687   test_springcoat_release:
688     executor: build-on-linux-amd64
689     steps:
690       - checkout
691       - linux-install-required
692       - attach_workspace:
693           at: .
694       - run:
695           name: SpringCoat Tests
696           command: timeout --foreground 60m ./gradlew testSpringCoatRelease <<pipeline.parameters.standard-gradle-options>>
697           no_output_timeout: 60m
698       - save-test-results:
699           where: "vm-test-springcoat-release"
700           os: "linux"
701           vm: "springcoat"
703   ################################### USERS ##################################
704   export_user_guide:
705     executor: build-on-linux-amd64
706     steps:
707       - checkout
708       - linux-install-required
709       - run:
710           name: Checkout Wiki
711           command: git clone git@github.com:SquirrelJME/SquirrelJME.wiki.git /tmp/wiki
712       - run:
713           name: Wikify
714           command: .circleci/squirreljme-wikify-user-guide.sh "$(pwd)" "/tmp/wiki"
715       - run:
716           name: Update Git User
717           command: |
718             cd "/tmp/wiki" && git config user.name "SquirrelJME Automation" && git config user.email "xerthesquirrel+squirreljme@gmail.com"
719       - run:
720           name: Commit changes
721           command: |
722             cd "/tmp/wiki" && git commit -m "Synchronize User-Guide" || echo "Ignoring commit."
723       - add_ssh_keys:
724           fingerprints:
725             - "26:b8:ae:4d:53:64:4c:6a:59:3d:a6:60:44:90:9d:6c"
726       - run:
727           name: Push changes
728           command: |
729             cd "/tmp/wiki" && git push
731   ################################ CONSTRUCTION ###############################
732   # Runs the `testJar` task so any operations following this will run faster
733   # when they need to use these JARs
734   construct_testJars:
735     executor: build-on-linux-amd64
736     steps:
737       - checkout
738       - linux-install-required
739       - attach_workspace:
740           at: .
741       - run:
742           name: Construct Test JARs
743           command: ./gradlew testJar <<pipeline.parameters.standard-gradle-options>>
744       - persist-gradle
746 workflows:
747   version: 2
748   tests:
749     jobs:
750       ############################# STANDARD TESTS ############################
751       # AMD64
752       - build_linux_amd64
753       - test_springcoat_debug:
754           requires:
755             - construct_testJars
756           filters:
757             branches:
758               only:
759                 - trunk
760       - test_springcoat_release:
761           requires:
762             - construct_testJars
763           filters:
764             branches:
765               only:
766                 - trunk
767       - build_linux_amd64_standalone:
768           requires:
769             - build_linux_amd64
770           filters:
771             branches:
772               only:
773                 - trunk
774       - build_linux_amd64_standalone_flatpak:
775           requires:
776             - build_linux_amd64
777           filters:
778             branches:
779               only:
780                 - trunk
782       # ARM64
783       - build_linux_arm64:
784           filters:
785             branches:
786               only:
787                 - trunk
788       - build_linux_arm64_standalone:
789           requires:
790             - build_linux_arm64
791           filters:
792             branches:
793               only:
794                 - trunk
795       - build_linux_arm64_standalone_flatpak:
796           requires:
797             - build_linux_arm64
798           filters:
799             branches:
800               only:
801                 - trunk
803       # RISC-V 64-bit
804 #      - build_linux_riscv64
805 #      - build_linux_riscv64_standalone:
806 #          requires:
807 #            - build_linux_riscv64
808 #          filters:
809 #            branches:
810 #              only:
811 #                - trunk
813       # Windows 32-bit
814       - build_windows_i386_setup:
815           filters:
816             branches:
817               only:
818                 - trunk
819       - build_windows_i386:
820           requires:
821             - build_windows_i386_setup
822           filters:
823             branches:
824               only:
825                 - trunk
826       - build_windows_i386_standalone:
827           requires:
828             - build_windows_i386
829           filters:
830             branches:
831               only:
832                 - trunk
834       # Windows 64-bit
835       - build_windows_amd64_setup
836       - build_windows_amd64:
837           requires:
838             - build_windows_amd64_setup
839       - build_windows_amd64_standalone:
840           requires:
841             - build_windows_amd64
842           filters:
843             branches:
844               only:
845                 - trunk
847       # Mac OS X runs decently however the jobs for it have a higher cost, so
848       # only perform builds and tests for trunk to lower costs.
849       # Currently, I have an overabundance of credits...
850       - build_macosx_amd64
851       - build_macosx_arm64
852       - build_macosx_amd64_standalone:
853           requires:
854             - build_macosx_amd64
855           filters:
856             branches:
857               only:
858                 - trunk
859       - build_macosx_arm64_standalone:
860           requires:
861             - build_macosx_arm64
862           filters:
863             branches:
864               only:
865                 - trunk
867       # Publishing to OSS Sonatype Nexus (https://oss.sonatype.org)
868       - sonatype_publish:
869           requires:
870             - build_linux_amd64
871           filters:
872             branches:
873               only:
874                 - trunk
875                 - wip-centralpublish
877       ###################### LIBRARY AND ROM CONSTRUCTION #####################
878       - construct_testJars:
879           requires:
880             - build_linux_amd64
881           filters:
882             branches:
883               only:
884                 - trunk
886       ############################## DEPLOYMENT ##############################
887       - bundle:
888           requires:
889             - build_linux_amd64_standalone
890             - build_linux_amd64_standalone_flatpak
891             - build_linux_arm64_standalone_flatpak
892             - build_windows_i386_standalone
893             - build_windows_amd64_standalone
894             - build_macosx_amd64_standalone
895             - build_macosx_arm64_standalone
896           filters:
897             branches:
898               only:
899                 - trunk
901   #################### TASKS TO INCREASE USER FRIENDLINESS ####################
902   friendliness:
903     jobs:
904       - export_user_guide:
905           filters:
906             branches:
907               only:
908                 - trunk
909                 - wip-userguide