From 7e5898735068ec889146b58c059f94b95259e3cc Mon Sep 17 00:00:00 2001
From: Max Melchert <maximilian.melchert@stud.hs-bochum.de>
Date: Tue, 25 Feb 2025 13:10:58 +0100
Subject: [PATCH] build: add gitlab ci demo

---
 .gitlab-ci.yml     | 32 ++++++++++++++++++++++++++++++++
 src/.gitlab-ci.yml |  1 +
 2 files changed, 33 insertions(+)
 create mode 100644 .gitlab-ci.yml
 create mode 120000 src/.gitlab-ci.yml

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000..fc790a0
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,32 @@
+create-file:
+  stage: build
+  image: python
+  tags:
+    - gpu
+  script:
+    - |
+      cat <<EOF > test.py
+      with open('output.txt', 'w') as f:
+        f.write('hello world!\\n')
+      EOF
+    - python test.py
+  artifacts:
+    paths:
+      - output.txt
+
+test-file-output:
+  stage: test
+  script:
+    - grep -q "hello world!" output.txt
+  dependencies:
+    - create-file
+
+deploy-output:
+  stage: deploy
+  script:
+    - cp output.txt release.txt
+  artifacts:
+    paths:
+      - release.txt
+  dependencies:
+    - create-file
diff --git a/src/.gitlab-ci.yml b/src/.gitlab-ci.yml
new file mode 120000
index 0000000..47fa87e
--- /dev/null
+++ b/src/.gitlab-ci.yml
@@ -0,0 +1 @@
+../.gitlab-ci.yml
\ No newline at end of file
-- 
GitLab