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