diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 64b0421..aea2b48 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,48 +1,78 @@ -image: gradle:jdk18 - variables: GRADLE_OPTS: "-Dorg.gradle.daemon=false" -before_script: - - export GRADLE_USER_HOME=`pwd`/.gradle - stages: - build - - portable - deploy +default: + image: gradle:jdk18 + before_script: + - export GRADLE_USER_HOME=`pwd`/.gradle + - export TIMESTAMP=$(date -d "$CI_PIPELINE_CREATED_AT" +%s) + build_test: stage: build script: - - TIMESTAMP=$(date +%s) + - gradle --build-cache :exportMetadata -Ppublic -Ptimestamp=$TIMESTAMP + artifacts: + paths: + - version.json + expire_in: 2 days + +build_platform_jars: + stage: build + script: + - gradle --build-cache :launcher-dist:build -Pflavor=fat -Ppublic -Ptimestamp=$TIMESTAMP + - gradle --build-cache :launcher-dist:build -Pflavor=windows -Ppublic -Ptimestamp=$TIMESTAMP + - gradle --build-cache :launcher-dist:build -Pflavor=linux -Ppublic -Ptimestamp=$TIMESTAMP + - gradle --build-cache :launcher-dist:build -Pflavor=macos -Ppublic -Ptimestamp=$TIMESTAMP + - for f in launcher-dist/build/libs/Inceptum-*-*-*.jar; do mv "$f" "Inceptum-${f##*-}";done + - mv Inceptum-fat.jar Inceptum.jar + artifacts: + paths: + - launcher-dist/build/libs + - Inceptum-*.jar + - Inceptum.jar + expire_in: 2 days + +build_wrapper: + stage: build + script: + - gradle --build-cache :wrapper:build -Pflavor=windows -Ppublic -Ptimestamp=$TIMESTAMP + - cp wrapper/build/libs/*.exe wrapper.exe + - cp wrapper/build/libs/*-all.jar wrapper.jar + artifacts: + paths: + - wrapper/build/libs + - wrapper.jar + - wrapper.exe + expire_in: 2 days + +publish_debug: + stage: deploy + script: - gradle --build-cache build publish -Pflavor=maven -Ppublic -Ptimestamp=$TIMESTAMP - gradle --build-cache build :launcher-dist:publish -Pflavor=fat -Pdist.platformOnly -Ppublic -Ptimestamp=$TIMESTAMP - gradle --build-cache build :launcher-dist:publish -Pflavor=windows -Pdist.platformOnly -Ppublic -Ptimestamp=$TIMESTAMP - gradle --build-cache build :launcher-dist:publish -Pflavor=linux -Pdist.platformOnly -Ppublic -Ptimestamp=$TIMESTAMP - gradle --build-cache build :launcher-dist:publish -Pflavor=macos -Pdist.platformOnly -Ppublic -Ptimestamp=$TIMESTAMP - - gradle --build-cache :exportMetadata -Ppublic -Ptimestamp=$TIMESTAMP - - mkdir -p build/libs - - cp launcher-dist/build/libs/* build/libs/ - - cp wrapper/build/libs/* build/libs/ - - cp launcher-dist/build/libs/*-*-*-*.jar ./ - - cp wrapper/build/libs/*.exe wrapper.exe - - cp wrapper/build/libs/*-all.jar wrapper.jar - - for f in *-*-*.jar; do mv "$f" "latest-${f##*-}";done - - mv latest-fat.jar latest.jar - artifacts: - paths: - - build/libs - - latest.jar - - wrapper.jar - - wrapper.exe - - latest-*.jar - - version.json - expire_in: 2 days only: - master +publish_release: + rules: + - if: $CI_COMMIT_TAG && '$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME =~ /^master/' + stage: deploy + script: + - gradle --build-cache build publish -Pflavor=maven -Ppublic -Prelease + - gradle --build-cache build :launcher-dist:publish -Pflavor=fat -Pdist.platformOnly -Ppublic -Prelease + - gradle --build-cache build :launcher-dist:publish -Pflavor=windows -Pdist.platformOnly -Ppublic -Prelease + - gradle --build-cache build :launcher-dist:publish -Pflavor=linux -Pdist.platformOnly -Ppublic -Prelease + - gradle --build-cache build :launcher-dist:publish -Pflavor=macos -Pdist.platformOnly -Ppublic -Prelease + portable: - stage: portable + stage: deploy image: archlinux:latest script: - pacman -Sy p7zip curl jq --noconfirm @@ -70,17 +100,6 @@ portable: only: - master -deploy: - rules: - - if: $CI_COMMIT_TAG && '$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME =~ /^master/' - stage: deploy - script: - - gradle --build-cache build publish -Pflavor=maven -Ppublic -Prelease - - gradle --build-cache build :launcher-dist:publish -Pflavor=fat -Pdist.platformOnly -Ppublic -Prelease - - gradle --build-cache build :launcher-dist:publish -Pflavor=windows -Pdist.platformOnly -Ppublic -Prelease - - gradle --build-cache build :launcher-dist:publish -Pflavor=linux -Pdist.platformOnly -Ppublic -Prelease - - gradle --build-cache build :launcher-dist:publish -Pflavor=macos -Pdist.platformOnly -Ppublic -Prelease - pages: image: python:3.8-buster stage: deploy diff --git a/docs/Installing.md b/docs/Installing.md index 15a424c..a3a26f0 100644 --- a/docs/Installing.md +++ b/docs/Installing.md @@ -6,14 +6,12 @@ Inceptum can be installed in a number of ways, all of which are documented below First, download the Inceptum build appropriate for your system: -- [Windows x86_64](https://gitlab.com/JFronny/inceptum/-/jobs/artifacts/master/raw/latest-windows.jar?job=build_test) -- [MacOS x86_64](https://gitlab.com/JFronny/inceptum/-/jobs/artifacts/master/raw/latest-macos.jar?job=build_test) (untested) -- [Linux x86_64](https://gitlab.com/JFronny/inceptum/-/jobs/artifacts/master/raw/latest-linux.jar?job=build_test) +- [Windows x86_64](https://gitlab.com/JFronny/inceptum/-/jobs/artifacts/master/raw/Inceptum-windows.jar?job=build_platform_jars) +- [MacOS x86_64](https://gitlab.com/JFronny/inceptum/-/jobs/artifacts/master/raw/Inceptum-macos.jar?job=build_platform_jars) (untested) +- [Linux x86_64](https://gitlab.com/JFronny/inceptum/-/jobs/artifacts/master/raw/Inceptum-linux.jar?job=build_platform_jars) -The following additional builds are also available but not recommended for normal use: - -- [Windows/Mac/Linux x86_64 in one](https://gitlab.com/JFronny/inceptum/-/jobs/artifacts/master/raw/latest.jar?job=build_test) -- [Headless](https://gitlab.com/JFronny/inceptum/-/jobs/artifacts/master/raw/latest-nogui.jar?job=build_test) +You can also download a [single jar](https://gitlab.com/JFronny/inceptum/-/jobs/artifacts/master/raw/Inceptum.jar?job=build_platform_jars) +that contains support for all of these systems (though doing so is not recommended) Once you have a jar, run it with an [up-to-date java version](https://adoptium.net/). Inceptum will use your config directory ($XDG_CONFIG_HOME, ~/.config/Inceptum, %APPDATA%\Inceptum or ~/Library/Application Support/Inceptum) for saving instances/caches/etc. @@ -34,10 +32,10 @@ If this parameter is specified, all other locations will be ignored. ## Simple installation with updates To use automatic updates, you must use the Inceptum Wrapper. -Simply launch this [cross-platform jar](https://gitlab.com/JFronny/inceptum/-/jobs/artifacts/master/raw/wrapper.jar?job=build_test) +Simply launch this [cross-platform jar](https://gitlab.com/JFronny/inceptum/-/jobs/artifacts/master/raw/wrapper.jar?job=build_wrapper) and Inceptum will launch as described above (though the initial startup may take a bit longer). The same rules for config locations apply. -You may also download the [windows exe](https://gitlab.com/jfmods/inceptum/-/jobs/artifacts/master/raw/wrapper.exe?job=build_test) +You may also download the [windows exe](https://gitlab.com/jfmods/inceptum/-/jobs/artifacts/master/raw/wrapper.exe?job=build_wrapper) which uses fabric-installer-native-bootstrap to locate the JVM used by the official minecraft launcher and launch Inceptum using that. Please be aware that this is pretty much untested