GitHub/Actions: Add a workflow running gbs Tizen build
authorWook Song <wook16.song@samsung.com>
Tue, 13 Feb 2024 07:30:22 +0000 (16:30 +0900)
committerMyungJoo Ham <myungjoo.ham@samsung.com>
Wed, 14 Feb 2024 06:24:36 +0000 (15:24 +0900)
This patch adds a GitHub Actions workflow that runs GBS Tizen build and
unit testing.

Signed-off-by: Wook Song <wook16.song@samsung.com>
.github/workflows/tizen.gbs.conf [new file with mode: 0644]
.github/workflows/tizen_gbs.yml [new file with mode: 0644]

diff --git a/.github/workflows/tizen.gbs.conf b/.github/workflows/tizen.gbs.conf
new file mode 100644 (file)
index 0000000..dea4a35
--- /dev/null
@@ -0,0 +1,21 @@
+[general]
+profile = profile.tizen
+tmpdir = /var/tmp
+packaging_branch = tizen
+workdir = .
+
+[profile.tizen]
+url = https://api.tizen.org
+obs = obs.tizen
+
+repos = repo.base, repo.unified
+buildroot = ~/GBS-ROOT/
+
+[obs.tizen]
+url = https://api.tizen.org
+
+[repo.base]
+url = http://download.tizen.org/snapshots/TIZEN/Tizen/Tizen-Base/reference/repos/standard/packages/
+
+[repo.unified]
+url = http://download.tizen.org/snapshots/TIZEN/Tizen/Tizen-Unified/reference/repos/standard/packages/
diff --git a/.github/workflows/tizen_gbs.yml b/.github/workflows/tizen_gbs.yml
new file mode 100644 (file)
index 0000000..43dbacb
--- /dev/null
@@ -0,0 +1,32 @@
+name: GBS Tizen build from Ubuntu
+
+on:
+  push:
+    branches: [ main ]
+  pull_request:
+    branches: [ main ]
+
+jobs:
+  build:
+    strategy:
+      matrix:
+        include:
+          - arch: "x86_64"
+            option: "--define \"unit_test 1\""
+          - arch: "i586"
+            option: "--define \"unit_test 0\""
+          - arch: "armv7l"
+            option: "--define \"unit_test 0\""
+          - arch: "aarch64"
+            option: "--define \"unit_test 1\""
+    runs-on: ubuntu-20.04
+    steps:
+    - uses: actions/checkout@v4
+    - name: prepare deb sources for GBS
+      run: echo "deb [trusted=yes] http://download.tizen.org/tools/latest-release/Ubuntu_20.04/ /" | sudo tee /etc/apt/sources.list.d/tizen.list
+    - name: install GBS
+      run: sudo apt-get update && sudo apt-get install -y gbs
+    - name: configure GBS
+      run: cp .github/workflows/tizen.gbs.conf ~/.gbs.conf
+    - name: run GBS
+      run: gbs build --skip-srcrpm --define "_skip_debug_rpm 1" -A ${{ matrix.arch }} ${{ matrix.option }}