summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Weipert <code@drogueronin.de>2023-05-29 09:19:51 +0200
committerDaniel Weipert <code@drogueronin.de>2023-05-29 13:50:38 +0200
commitfde9095587cea432997eb24c3a3f9c61737e2f1e (patch)
tree48e0100948f79bf31739a582e7f8a6d2cb157a66
parent50fa761d6943e9cd0faef1ea6b801629af5ec889 (diff)
gitlab-ci
-rw-r--r--.gitlab-ci.yml17
-rw-r--r--Readme.md3
-rw-r--r--nix/android-composition.nix8
-rw-r--r--shell.nix4
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
diff --git a/Readme.md b/Readme.md
index af3af6a..bebbbc1 100644
--- a/Readme.md
+++ b/Readme.md
@@ -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"];
}
diff --git a/shell.nix b/shell.nix
index 7017e08..d457038 100644
--- a/shell.nix
+++ b/shell.nix
@@ -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
'';
}