Skip to content

Commit 534c06e

Browse files
committed
citrus: Migrate to GitHub Actions
1 parent d60cce2 commit 534c06e

4 files changed

Lines changed: 122 additions & 53 deletions

File tree

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Build devel-flashable
2+
3+
on:
4+
push:
5+
branches: [ "halium-11" ]
6+
workflow_call:
7+
workflow_dispatch:
8+
9+
jobs:
10+
build:
11+
uses: ./.github/workflows/build-tarball.yml
12+
13+
devel-flashable:
14+
needs: build
15+
runs-on: ubuntu-22.04
16+
env:
17+
ADAPTATION_TOOLS_BRANCH: main
18+
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
23+
- name: Setup build environment
24+
run: |
25+
sudo apt update
26+
sudo apt install -y git img2simg jq sudo wget xz-utils
27+
28+
- name: Build devel-flashable
29+
run: |
30+
git clone https://gitlab.com/ubports/community-ports/halium-generic-adaptation-build-tools -b $ADAPTATION_TOOLS_BRANCH build
31+
DEVICE="$(source deviceinfo && echo $deviceinfo_codename)"
32+
./build/prepare-fake-ota.sh out/device_${DEVICE}.tar.xz ota
33+
mkdir -p out
34+
./build/system-image-from-ota.sh ota/ubuntu_command out
35+
mv out/rootfs.img out/ubuntu.img
36+
37+
- name: Upload image to artifacts
38+
uses: actions/upload-artifact@v4
39+
with:
40+
name: citrus-devel-flashable
41+
path: |
42+
out/boot.img
43+
out/dtbo.img
44+
out/ubuntu.img
45+
if-no-files-found: error
46+
overwrite: true
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Build flashable
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
build:
8+
uses: ./.github/workflows/build-tarball.yml
9+
10+
flashable:
11+
needs: build
12+
runs-on: ubuntu-22.04
13+
env:
14+
ADAPTATION_TOOLS_BRANCH: main
15+
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
20+
- name: Setup build environment
21+
run: |
22+
sudo apt update
23+
sudo apt install -y git img2simg jq sudo wget xz-utils
24+
25+
- name: Build flashable
26+
run: |
27+
git clone https://gitlab.com/ubports/community-ports/halium-generic-adaptation-build-tools -b $ADAPTATION_TOOLS_BRANCH build
28+
DEVICE="$(source deviceinfo && echo $deviceinfo_codename)"
29+
./build/fetch-and-prepare-latest-ota.sh "20.04/arm64/android9plus/devel" "$DEVICE" ota
30+
mkdir -p out
31+
./build/system-image-from-ota.sh ota/ubuntu_command out
32+
33+
- name: Upload image to artifacts
34+
uses: actions/upload-artifact@v4
35+
with:
36+
name: citrus-flashable
37+
path: |
38+
out/boot.img
39+
out/dtbo.img
40+
out/system.img
41+
if-no-files-found: error
42+
overwrite: true

‎.github/workflows/build.yml‎

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Build
2+
3+
on:
4+
workflow_call:
5+
6+
jobs:
7+
build:
8+
runs-on: ubuntu-22.04
9+
env:
10+
ADAPTATION_TOOLS_BRANCH: main
11+
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v4
15+
16+
- name: Setup build environment
17+
run: |
18+
sudo apt update
19+
sudo apt install bc bison build-essential ca-certificates cpio curl fakeroot flex git kmod libssl-dev libtinfo5 lz4 python2 python3 sudo unzip wget xz-utils -y --no-install-recommends
20+
sudo ln -s python2 /usr/bin/python
21+
sudo wget https://raw.githubusercontent.com/LineageOS/android_system_core/lineage-17.1/mkbootimg/mkbootimg.py -O /usr/bin/mkbootimg
22+
23+
- name: Build
24+
run: |
25+
git clone https://gitlab.com/ubports/community-ports/halium-generic-adaptation-build-tools -b $ADAPTATION_TOOLS_BRANCH build
26+
./build.sh
27+
28+
- name: Upload to artifacts
29+
uses: actions/upload-artifact@v4
30+
with:
31+
name: build-tarball
32+
path: out
33+
if-no-files-found: error
34+
overwrite: true

‎.gitlab-ci.yml‎

Lines changed: 0 additions & 53 deletions
This file was deleted.

0 commit comments

Comments
 (0)