diff options
-rw-r--r-- | .gitlab-ci.yml | 17 | ||||
-rw-r--r-- | Readme.md | 3 | ||||
-rw-r--r-- | nix/android-composition.nix | 8 | ||||
-rw-r--r-- | shell.nix | 4 |
4 files changed, 27 insertions, 5 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..4a6b052 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,17 @@ +build: + stage: build + only: + - tags + + image: nixpkgs/nix + + before_script: + - export NIX_PATH=nixpkgs=channel:nixos-unstable + + script: + - nix-shell --command "make build" + - cp bazel-bin/app/java/dnsproxy.apk ${CI_PROJECT_DIR}/dnsproxy.apk + + artifacts: + paths: + - dnsproxy.apk @@ -36,3 +36,6 @@ ### APK - https://stackoverflow.com/questions/43513006/how-to-build-a-release-apk-with-signature-in-bazel - https://groups.google.com/g/bazel-discuss/c/2BPWVRnsiGc + +### Gitlab CI +- https://discourse.nixos.org/t/how-to-use-nix-develop-within-a-gitlab-ci-pipeline/24027 diff --git a/nix/android-composition.nix b/nix/android-composition.nix index 17c6e69..10ba2a5 100644 --- a/nix/android-composition.nix +++ b/nix/android-composition.nix @@ -7,8 +7,8 @@ androidenv.composeAndroidPackages { platformVersions = ["28" "30" "31"]; buildToolsVersions = ["30.0.3"]; - includeEmulator = true; - includeSystemImages = true; - systemImageTypes = ["google_apis_playstore"]; - abiVersions = ["x86_64"]; + # includeEmulator = true; + # includeSystemImages = true; + # systemImageTypes = ["google_apis_playstore"]; + # abiVersions = ["x86_64"]; } @@ -7,6 +7,8 @@ mkShell rec { name = "android-shell"; buildInputs = [ + python3Full + gnumake jdk android-composition.androidsdk bazel_4 @@ -19,6 +21,6 @@ mkShell rec { shellHook = '' # TODO: replace with nix builtins - sudo python ./nix/android-shell-shellHook.py ${ANDROID_HOME}/build-tools ${ANDROID_HOME}/platforms + python ./nix/android-shell-shellHook.py ${ANDROID_HOME}/build-tools ${ANDROID_HOME}/platforms ''; } |