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