Commit defb2c40 authored by Stephanie Gawroriski's avatar Stephanie Gawroriski
Browse files

Merge wip-gradle-modernization branch into trunk.

parents 3b7aa9b6 bc7ebd45
......@@ -13,330 +13,78 @@ executors:
buildenv:
docker:
- image: circleci/openjdk:8-jdk
working_directory: ~/squirreljme-build
orbs:
win: circleci/windows@2.2.0
commands:
initialize_buildenv:
description: "Initializes the build environment"
steps:
- checkout:
path: ~/squirreljme
- run:
name: Setup directories
command: mkdir -p ~/squirreljme-build /tmp/summercoat /tmp/summercoat-test
- run:
name: Install build-essential
command: sudo apt-get install --no-install-recommends -y build-essential || true
- run:
name: Install crossbuild-essential-powerpc
command: sudo apt-get install --no-install-recommends -y crossbuild-essential-powerpc || true
- run:
name: Install crossbuild-essential-mips
command: sudo apt-get install --no-install-recommends -y crossbuild-essential-mips || true
- run:
name: Install crossbuild-essential-mipsel
command: sudo apt-get install --no-install-recommends -y crossbuild-essential-mipsel || true
- run:
name: Install qemu-user
command: sudo apt-get install --no-install-recommends -y qemu-user || true
- run:
name: Install unzip
command: sudo apt-get install --no-install-recommends -y unzip || true
jobs:
build_javase_windows:
build_windows:
executor:
name: win/default
shell: cmd.exe
steps:
- checkout:
path: c:\users\circleci\squirreljme
- run:
name: Make build directory
command: mkdir c:\users\circleci\squirreljme-build
- run:
name: Go to build directory
command: cd c:\users\circleci\squirreljme-build
- run:
name: Perform Shaded Java SE Build
command: c:\users\circleci\squirreljme\build.cmd dist javase
build_javase:
executor: buildenv
steps:
- initialize_buildenv
- run:
name: Shade JavaSE
command: ~/squirreljme/build.sh dist javase
build_javame:
executor: buildenv
steps:
- initialize_buildenv
- run:
name: Shade JavaME
command: ~/squirreljme/build.sh dist javame
build_summercoatrom:
executor: buildenv
steps:
- initialize_buildenv
- run:
name: Building SummerCoat ROM
command: ~/squirreljme/build.sh dist summercoatrom
- run:
name: UnZip SummerCoat ROM
command: unzip -o squirreljme-summercoatrom.zip
- run:
name: Copy ROM file
command: cp -v squirreljme.sqc /tmp/summercoat/squirreljme.sqc
- persist_to_workspace:
root: /tmp/summercoat
paths:
- squirreljme.sqc
build_summercoatromtest:
executor: buildenv
steps:
- initialize_buildenv
- run:
name: Building SummerCoat Test ROM
command: ~/squirreljme/build.sh dist summercoatrom-test
- run:
name: UnZip SummerCoat ROM
command: unzip -o squirreljme-summercoatrom-test.zip
- run:
name: Copy ROM file
command: cp -v squirreljme.sqc /tmp/summercoat-test/squirreljme.sqc
- persist_to_workspace:
root: /tmp/summercoat-test
paths:
- squirreljme.sqc
tests_baseline:
executor: buildenv
steps:
- initialize_buildenv
- run:
name: Clear old test results and snapshot
command: rm -f bljut/baseline/results.xml baseline.nps
- run:
name: Create test directory
command: mkdir -p bljut/baseline
- run:
name: Running Baseline Tests
command: ~/squirreljme/utils-dev/hostedlaunch.sh tac-runner > bljut/baseline/results.xml
- store_test_results:
path: bljut
tests_springcoat:
executor: buildenv
steps:
- initialize_buildenv
- run:
name: Clear old test results and snapshot
command: rm -f spjut/springcoat/results.xml springcoat.nps
- run:
name: Create test directory
command: mkdir -p spjut/springcoat
- run:
name: Running SpringCoat VM
command: ~/squirreljme/build.sh launch -v springcoat -n springcoat.nps -Dcc.squirreljme.debug=false tac-runner > spjut/springcoat/results.xml
no_output_timeout: 30m
- checkout
- run:
name: Gradle Build
command: gradlew build --continue --parallel
shell: cmd.exe
- run:
name: Save test results
command: |
mkdir -p /c/users/circleci/test-results/junit
/usr/bin/find . -type f -regex '.*/build/test-results/.*xml' -exec cp {} /c/users/circleci/test-results/junit/ \;
when: always
shell: bash.exe
- store_test_results:
path: spjut
path: c:\users\circleci\test-results
- store_artifacts:
path: springcoat.nps
destination: /nps/springcoat.nps
tests_summercoat:
path: c:\users\circleci\test-results
build_linux:
executor: buildenv
steps:
- initialize_buildenv
- run:
name: Clear old test results and snapshot
command: rm -f sujut/summercoat/results.xml summercoat.nps
- checkout
- run:
name: Create test directory
command: mkdir -p sujut/summercoat
name: Gradle Build
command: ./gradlew build --continue --parallel
- run:
name: Running SummerCoat VM
command: ~/squirreljme/build.sh launch -v summercoat -n summercoat.nps -Dcc.squirreljme.debug=false tac-runner > sujut/summercoat/results.xml
name: Save test results
command: |
mkdir -p ~/test-results/junit/
find . -type f -regex '.*/build/test-results/.*xml' -exec cp {} ~/test-results/junit/ \;
when: always
- store_test_results:
path: sujut
path: ~/test-results
- store_artifacts:
path: summercoat.nps
destination: /nps/summercoat.nps
tests_summercoatrom:
executor: buildenv
path: ~/test-results/junit
build_macosx:
macos:
xcode: 11.3.0
steps:
- initialize_buildenv
- attach_workspace:
at: /tmp/summercoat-test
- checkout
- run:
name: Clear old test results and snapshot
command: rm -f svjut/summercoatrom/results.xml summercoatrom.nps
name: Update Brew
command: brew update
- run:
name: Create test directory
command: mkdir -p svjut/summercoatrom
name: Install Gradle and OpenJDK 11
command: brew install gradle openjdk@11
- run:
name: Take SummerCoat Test ROM
command: cp -v /tmp/summercoat-test/squirreljme.sqc .
name: Gradle Build
command: ./gradlew build --continue --parallel
- run:
name: Running SummerCoat VM
command: ~/squirreljme/build.sh launch -v summercoat -n summercoatrom.nps -Dcc.squirreljme.debug=false -Dcc.squirreljme.romfile=squirreljme.sqc tac-runner > svjut/summercoatrom/results.xml
name: Save test results
command: |
mkdir -p ~/test-results/junit/
find . -type f -regex '.*/build/test-results/.*xml' -exec cp {} ~/test-results/junit/ \;
when: always
- store_test_results:
path: svjut
path: ~/test-results
- store_artifacts:
path: summercoatrom.nps
destination: /nps/summercoatrom.nps
tests_ratufacoat_default:
executor: buildenv
steps:
- initialize_buildenv
- attach_workspace:
at: /tmp/summercoat-test
- run:
name: Clear old test results and snapshot
command: rm -f rdjut/ratufacoatdef/results.xml
- run:
name: Create test directory
command: mkdir -p rdjut/ratufacoatdef
- run:
name: Take SummerCoat Test ROM
command: cp -v /tmp/summercoat-test/squirreljme.sqc .
- run:
name: Cleaning RatufaCoat VM (Default)
command: make -C ~/squirreljme/ratufacoat -f ~/squirreljme/ratufacoat/makefile clean
- run:
name: Building RatufaCoat VM (Default)
command: make -C ~/squirreljme/ratufacoat -f ~/squirreljme/ratufacoat/makefile squirreljme-stdc
- run:
name: Running RatufaCoat VM (Default)
command: ~/squirreljme/ratufacoat/squirreljme-stdc -Dcc.squirreljme.autolaunch=tac-runner > rdjut/ratufacoatdef/results.xml
- store_test_results:
path: rdjut
tests_ratufacoat_ppc:
executor: buildenv
steps:
- initialize_buildenv
- run:
name: Halt if compiler not available
command: if ! which powerpc-linux-gnu-gcc; then circleci-agent step halt; fi
- attach_workspace:
at: /tmp/summercoat-test
- run:
name: Clear old test results and snapshot
command: rm -f rpjut/ratufacoatppc/results.xml
- run:
name: Create test directory
command: mkdir -p rpjut/ratufacoatppc
- run:
name: Take SummerCoat Test ROM
command: cp -v /tmp/summercoat-test/squirreljme.sqc .
- run:
name: Cleaning RatufaCoat VM (PowerPC)
command: make -C ~/squirreljme/ratufacoat -f ~/squirreljme/ratufacoat/makefile clean
- run:
name: Building RatufaCoat VM (PowerPC)
command: make -C ~/squirreljme/ratufacoat -f ~/squirreljme/ratufacoat/makefile squirreljme-stdc CC=powerpc-linux-gnu-gcc CFLAGS='-static -DSJME_BIG_ENDIAN'
- run:
name: Running RatufaCoat VM (PowerPC)
command: qemu-ppc ~/squirreljme/ratufacoat/squirreljme-stdc -Dcc.squirreljme.autolaunch=tac-runner > rpjut/ratufacoatppc/results.xml
- store_test_results:
path: rpjut
tests_ratufacoat_mips:
executor: buildenv
steps:
- initialize_buildenv
- run:
name: Halt if compiler not available
command: if ! which mips-linux-gnu-gcc; then circleci-agent step halt; fi
- attach_workspace:
at: /tmp/summercoat-test
- run:
name: Clear old test results and snapshot
command: rm -f rmjut/ratufacoatmips/results.xml
- run:
name: Create test directory
command: mkdir -p rmjut/ratufacoatmips
- run:
name: Take SummerCoat Test ROM
command: cp -v /tmp/summercoat-test/squirreljme.sqc .
- run:
name: Cleaning RatufaCoat VM (MIPS EB)
command: make -C ~/squirreljme/ratufacoat -f ~/squirreljme/ratufacoat/makefile clean
- run:
name: Building RatufaCoat VM (MIPS EB)
command: make -C ~/squirreljme/ratufacoat -f ~/squirreljme/ratufacoat/makefile squirreljme-stdc CC=mips-linux-gnu-gcc CFLAGS='-static -DSJME_BIG_ENDIAN'
- run:
name: Running RatufaCoat VM (MIPS EB)
command: qemu-mips ~/squirreljme/ratufacoat/squirreljme-stdc -Dcc.squirreljme.autolaunch=tac-runner > rmjut/ratufacoatmips/results.xml
- store_test_results:
path: rmjut
tests_ratufacoat_mipsel:
executor: buildenv
steps:
- initialize_buildenv
- run:
name: Halt if compiler not available
command: if ! which mipsel-linux-gnu-gcc; then circleci-agent step halt; fi
- attach_workspace:
at: /tmp/summercoat-test
- run:
name: Clear old test results and snapshot
command: rm -f rnjut/ratufacoatmipsel/results.xml
- run:
name: Create test directory
command: mkdir -p rnjut/ratufacoatmipsel
- run:
name: Take SummerCoat Test ROM
command: cp -v /tmp/summercoat-test/squirreljme.sqc .
- run:
name: Cleaning RatufaCoat VM (MIPS EL)
command: make -C ~/squirreljme/ratufacoat -f ~/squirreljme/ratufacoat/makefile clean
- run:
name: Building RatufaCoat VM (MIPS EL)
command: make -C ~/squirreljme/ratufacoat -f ~/squirreljme/ratufacoat/makefile squirreljme-stdc CC=mipsel-linux-gnu-gcc CFLAGS='-static -DSJME_LITTLE_ENDIAN'
- run:
name: Running RatufaCoat VM (MIPS EL)
command: qemu-mipsel ~/squirreljme/ratufacoat/squirreljme-stdc -Dcc.squirreljme.autolaunch=tac-runner > rnjut/ratufacoatmipsel/results.xml
- store_test_results:
path: rnjut
path: ~/test-results/junit
workflows:
version: 2
tests:
jobs:
- build_javase
- build_javame
- build_javase_windows:
requires:
- build_javase
- tests_baseline:
requires:
- build_javase
- build_summercoatrom:
requires:
- build_javase
- build_javame
- build_summercoatromtest:
requires:
- build_summercoatrom
- tests_springcoat:
requires:
- build_javase
- tests_summercoat:
requires:
- build_javase
- tests_summercoatrom:
requires:
- build_summercoatromtest
- tests_ratufacoat_default:
requires:
- build_summercoatromtest
- tests_ratufacoat_ppc:
requires:
- build_summercoatromtest
- tests_ratufacoat_mips:
requires:
- build_summercoatromtest
- tests_ratufacoat_mipsel:
requires:
- build_summercoatromtest
- build_windows
- build_linux
- build_macosx
gradle/wrapper/gradle-wrapper.jar
......@@ -61,10 +61,18 @@ ratufacoat/sjme_dos.exe
*.patch
*.diff
# Gradle building
.gradle
modules/build
modules/*/build
emulators/build
emulators/*/build
tools/build
tools/*/build
buildSrc/build
# Files which should be mime encoded
*.png
*.xcf
*.png
*.bmp
*.mid
*.midi
......
# Do not automatically adjust line endings so that way the line-feeds are
# the same and consistent
* text=false
name: Build
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build
run: ./gradlew build --continue --parallel
name: "Validate Gradle Wrapper"
on: [push, pull_request]
jobs:
validation:
name: "Validation"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: gradle/wrapper-validation-action@v1
......@@ -61,10 +61,18 @@ ratufacoat/sjme_dos.exe
*.patch
*.diff
# Gradle building
.gradle
modules/build
modules/*/build
emulators/build
emulators/*/build
tools/build
tools/*/build
buildSrc/build
# Files which should be mime encoded
*.png
*.xcf
*.png
*.bmp
*.mid
*.midi
......
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CheckStyle-IDEA">
<option name="configuration">
<map>
<entry key="checkstyle-version" value="8.29" />
<entry key="copy-libs" value="false" />
<entry key="location-0" value="BUNDLED:(bundled):Sun Checks" />
<entry key="location-1" value="BUNDLED:(bundled):Google Checks" />
<entry key="location-2" value="LOCAL_FILE:$PROJECT_DIR$/config/checkstyle/checkstyle.xml:SquirrelJME" />
<entry key="scan-before-checkin" value="false" />
<entry key="scanscope" value="JavaOnlyWithTests" />
<entry key="suppress-errors" value="true" />
</map>
</option>
</component>
</project>
\ No newline at end of file
<component name="ProjectCodeStyleConfiguration">
<code_scheme name="Project" version="173">
<option name="OTHER_INDENT_OPTIONS">
<value>
<option name="USE_TAB_CHARACTER" value="true" />
</value>
</option>
<option name="LINE_SEPARATOR" value="&#10;" />
<option name="RIGHT_MARGIN" value="79" />
<DBN-PSQL>
<case-options enabled="true">
<option name="KEYWORD_CASE" value="lower" />
<option name="FUNCTION_CASE" value="lower" />
<option name="PARAMETER_CASE" value="lower" />
<option name="DATATYPE_CASE" value="lower" />
<option name="OBJECT_CASE" value="preserve" />
</case-options>
<formatting-settings enabled="false" />
</DBN-PSQL>
<DBN-SQL>
<case-options enabled="true">
<option name="KEYWORD_CASE" value="lower" />
<option name="FUNCTION_CASE" value="lower" />
<option name="PARAMETER_CASE" value="lower" />
<option name="DATATYPE_CASE" value="lower" />
<option name="OBJECT_CASE" value="preserve" />
</case-options>
<formatting-settings enabled="false">
<option name="STATEMENT_SPACING" value="one_line" />
<option name="CLAUSE_CHOP_DOWN" value="chop_down_if_statement_long" />
<option name="ITERATION_ELEMENTS_WRAPPING" value="chop_down_if_not_single" />
</formatting-settings>
</DBN-SQL>
<JavaCodeStyleSettings>
<option name="PARAMETER_NAME_PREFIX" value="__" />
<option name="TEST_NAME_PREFIX" value="Test" />
<option name="TEST_NAME_SUFFIX" value="" />
<option name="SUBCLASS_NAME_SUFFIX" value="" />
<option name="GENERATE_FINAL_LOCALS" value="true" />
<option name="REPLACE_NULL_CHECK" value="false" />
<option name="REPLACE_SUM" value="false" />
<option name="CLASS_NAMES_IN_JAVADOC" value="3" />
<option name="CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND" value="99" />
<option name="NAMES_COUNT_TO_USE_IMPORT_ON_DEMAND" value="99" />
<option name="PACKAGES_TO_USE_IMPORT_ON_DEMAND">
<value />
</option>
<option name="IMPORT_LAYOUT_TABLE">
<value>
<package name="" withSubpackages="true" static="false" />
<package name="" withSubpackages="true" static="true" />
</value>
</option>
<option name="JD_DO_NOT_WRAP_ONE_LINE_COMMENTS" value="true" />
<option name="JD_PRESERVE_LINE_FEEDS" value="true" />
<option name="JD_PARAM_DESCRIPTION_ON_NEW_LINE" value="true" />
</JavaCodeStyleSettings>
<codeStyleSettings language="Groovy">
<indentOptions>
<option name="CONTINUATION_INDENT_SIZE" value="4" />
<option name="USE_TAB_CHARACTER" value="true" />
</indentOptions>
</codeStyleSettings>
<codeStyleSettings language="JAVA">
<option name="KEEP_LINE_BREAKS" value="false" />
<option name="KEEP_FIRST_COLUMN_COMMENT" value="false" />
<option name="KEEP_CONTROL_STATEMENT_IN_ONE_LINE" value="false" />
<option name="BLANK_LINES_BEFORE_PACKAGE" value="1" />
<option name="BLANK_LINES_AROUND_FIELD" value="1" />
<option name="BLANK_LINES_AROUND_FIELD_IN_INTERFACE" value="1" />
<option name="BRACE_STYLE" value="2" />
<option name="CLASS_BRACE_STYLE" value="2" />
<option name="METHOD_BRACE_STYLE" value="2" />
<option name="LAMBDA_BRACE_STYLE" value="3" />
<option name="ELSE_ON_NEW_LINE" value="true" />
<option name="CATCH_ON_NEW_LINE" value="true" />
<option name="FINALLY_ON_NEW_LINE" value="true" />
<option name="ALIGN_MULTILINE_PARAMETERS" value="false" />
<option name="SPACE_AFTER_TYPE_CAST" value="false" />
<option name="SPACE_BEFORE_CLASS_LBRACE" value="false" />
<option name="SPACE_BEFORE_METHOD_LBRACE" value="false" />
<option name="SPACE_BEFORE_ARRAY_INITIALIZER_LBRACE" value="true" />
<option name="CALL_PARAMETERS_WRAP" value="1" />
<option name="PREFER_PARAMETERS_WRAP" value="true" />
<option name="METHOD_PARAMETERS_WRAP" value="1" />
<option name="THROWS_LIST_WRAP" value="1" />
<option name="EXTENDS_KEYWORD_WRAP" value="2" />
<option name="THROWS_KEYWORD_WRAP" value="2" />
<option name="METHOD_CALL_CHAIN_WRAP" value="1" />
<option name="TERNARY_OPERATION_WRAP" value="1" />
<option name="ASSIGNMENT_WRAP" value="1" />
<option name="WRAP_COMMENTS" value="true" />
<option name="WRAP_LONG_LINES" value="true" />
<option name="WRAP_ON_TYPING" value="0" />
<indentOptions>
<option name="CONTINUATION_INDENT_SIZE" value="4" />
<option name="USE_TAB_CHARACTER" value="true" />
<option name="KEEP_INDENTS_ON_EMPTY_LINES" value="true" />
</indentOptions>
<arrangement>
<groups />
<rules>
<section>
<rule>
<match>
<AND>
<FIELD>true</FIELD>
<FINAL>true</FINAL>
<PUBLIC>true</PUBLIC>
<STATIC>true</STATIC>
</AND>
</match>
<order>BY_NAME</order>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<FIELD>true</FIELD>
<FINAL>true</FINAL>
<PROTECTED>true</PROTECTED>
<STATIC>true</STATIC>
</AND>
</match>
<order>BY_NAME</order>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<FIELD>true</FIELD>
<FINAL>true</FINAL>
<PACKAGE_PRIVATE>true</PACKAGE_PRIVATE>
<STATIC>true</STATIC>
</AND>
</match>
<order>BY_NAME</order>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<FIELD>true</FIELD>
<FINAL>true</FINAL>
<PRIVATE>true</PRIVATE>
<STATIC>true</STATIC>