Skip to content
Snippets Groups Projects
.gitlab-ci.yml 2.1 KiB
Newer Older
Florian Sesser's avatar
Florian Sesser committed
stages:
  - lint
  - build


default:
Florian Sesser's avatar
Florian Sesser committed
  tags:
    - nix
    - linux


hlint:
  stage: lint
Florian Sesser's avatar
Florian Sesser committed
  script:
    - nix-shell --run "hlint --version; hlint -j obelisk/frontend"
cabal-build-and-test:
  stage: build
  script:
    - nix-shell --run "cd obelisk; cabal build frontend"
build-debug-apk:
  stage: build
  script:
    - cd obelisk
    - nix-build -A android.frontend -o result-android
  artifacts:
    paths:
      - obelisk/result-android/android-app-debug.apk
build-unsigned-release-apk:
  stage: build
  script:
    - cd obelisk
    - nix-build -A android.frontend.release -o result-android-release
  artifacts:
    paths:
      - obelisk/result-android-release/android-app-release-unsigned.apk

build-unsigned-release-bundle:
  stage: build
  script:
    - cd obelisk
    - nix-build -A android.frontend.bundle -o result-android-bundle
  artifacts:
    paths:
      - obelisk/result-android-bundle/android-app.aab

build-signed-release-apk:
  stage: build
  script:
    - |
      nix-shell --command '
      keytool \
        -genkey \
          -v \
          -keystore ./obelisk/android-release.keystore \
          -alias release \
          -keyalg RSA \
          -keysize 2048 \
          -validity 36500 \
          -keypass insecurepasswordforci \
          -storepass insecurepasswordforci \
          -dname "OU=Testing;O=PrivateStorage"

    - cd obelisk
    - nix-build -A android.frontend.release -o result-android-release
  artifacts:
    paths:
      - obelisk/result-android-release/android-app-release.apk

build-signed-release-bundle:
  stage: build
  script:
    - |
      nix-shell --command '
      keytool \
        -genkey \
          -v \
          -keystore ./obelisk/android-release.keystore \
          -alias release \
          -keyalg RSA \
          -keysize 2048 \
          -validity 36500 \
          -keypass insecurepasswordforci \
          -storepass insecurepasswordforci \
          -dname "OU=Testing;O=PrivateStorage"

    - cd obelisk
    - nix-build -A android.frontend.bundle -o result-android-bundle
  artifacts:
    paths:
      - obelisk/result-android-bundle/android-app.aab