CI: add sourcehut builds configuration
authorPaul Spooren <mail@aparcar.org>
Sun, 29 Nov 2020 01:34:16 +0000 (15:34 -1000)
committerPaul Spooren <mail@aparcar.org>
Thu, 24 Jun 2021 17:42:38 +0000 (07:42 -1000)
Build OpenWrt default configuration to evaluate SourceHut as a GitLab CI
alternative.

Signed-off-by: Paul Spooren <mail@aparcar.org>
.builds/build.yml [new file with mode: 0644]
.builds/find_targets.yml [new file with mode: 0644]

diff --git a/.builds/build.yml b/.builds/build.yml
new file mode 100644 (file)
index 0000000..4de8a95
--- /dev/null
@@ -0,0 +1,47 @@
+image: debian/stable
+
+sources:
+  - https://git.sr.ht/~aparcar/openwrt
+
+environment:
+  TARGET: "mediatek/mt7622"
+
+packages:
+  - build-essential
+  - curl
+  - file
+  - gawk
+  - gettext
+  - git
+  - libncurses-dev
+  - libssl-dev
+  - python3
+  - rsync
+  - subversion
+  - swig
+  - unzip
+  - wget
+  - zlib1g-dev
+
+artifacts:
+  - ./openwrt/bin/
+
+tasks:
+  - setup: |
+      cd openwrt
+      make defconfig
+      make prereq
+
+  - update_packages: |
+      cd openwrt
+      ./scripts/feeds update
+      ./scripts/feeds install -a
+
+  - configuration: |
+      cd openwrt
+      curl "https://downloads.openwrt.org/snapshots/targets/$TARGET/config.buildinfo" > .config
+      make defconfig
+
+  - build: |
+      cd openwrt
+      make -j $(nproc)
diff --git a/.builds/find_targets.yml b/.builds/find_targets.yml
new file mode 100644 (file)
index 0000000..a92be3c
--- /dev/null
@@ -0,0 +1,27 @@
+image: debian/stable
+
+sources:
+  - https://git.sr.ht/~aparcar/openwrt
+
+packages:
+  - build-essential
+  - curl
+  - file
+  - gawk
+  - gettext
+  - git
+  - libncurses-dev
+  - libssl-dev
+  - python3
+  - rsync
+  - subversion
+  - swig
+  - unzip
+  - wget
+  - zlib1g-dev
+
+tasks:
+  - setup: |
+      cd openwrt
+      ./scripts/dump-target-info.pl targets > targets.txt 2>/dev/null
+      cat targets.txt