-
-
Notifications
You must be signed in to change notification settings - Fork 192
/
.cirrus.yml
155 lines (152 loc) · 6.87 KB
/
.cirrus.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
compute_engine_instance:
image_project: freebsd-org-cloud-dev
image: family/freebsd-15-0-snap
platform: freebsd
cpu: 8
memory: 16G
disk: 80
base_task:
timeout_in: 120m
environment:
PKG_CONFIG_PATH: /usr/libdata/pkgconfig:/usr/local/libdata/pkgconfig
IGNORE_OSVERSION: yes
clone_script: |
pkg update
pkg install -yf git-tiny bison
if [ -z "$CIRRUS_PR" ]; then
git clone --recursive --branch=$CIRRUS_BRANCH https://x-access-token:${CIRRUS_REPO_CLONE_TOKEN}@github.com/${CIRRUS_REPO_FULL_NAME}.git $CIRRUS_WORKING_DIR
git reset --hard $CIRRUS_CHANGE_IN_REPO
else
git clone --recursive https://x-access-token:${CIRRUS_REPO_CLONE_TOKEN}@github.com/${CIRRUS_REPO_FULL_NAME}.git $CIRRUS_WORKING_DIR
git fetch origin pull/$CIRRUS_PR/head:pull/$CIRRUS_PR
git reset --hard $CIRRUS_CHANGE_IN_REPO
fi
setup_script:
- pkg remove -fy zstd
- pkg install -fy python311 python3 py311-pip py311-setuptools
- pip install --upgrade cloudsmith-cli
- echo "PLATFORM=$(uname -m).$(uname -p)" >> ${CIRRUS_ENV}
sys_cache:
folder: /usr/obj/${CIRRUS_WORKING_DIR}/*/sys
fingerprint_key: ${CIRRUS_BUILD_ID}_sys
reupload_on_changes: false
tmp_cache:
folder: /usr/obj/${CIRRUS_WORKING_DIR}/*/tmp
fingerprint_key: ${CIRRUS_BUILD_ID}_tmp
reupload_on_changes: true
release_cache:
folder: /usr/obj/${CIRRUS_WORKING_DIR}/*/release
fingerprint_key: ${CIRRUS_BUILD_ID}_release
reupload_on_changes: true
base_build_script:
- mkdir -p /usr/obj/${CIRRUS_WORKING_DIR}/${PLATFORM}
- cp -afv ${CIRRUS_WORKING_DIR}/usr/obj/${CIRRUS_WORKING_DIR}/${PLATFORM}/ /usr/obj/${CIRRUS_WORKING_DIR}/${PLATFORM}/
- mkdir -p /usr/obj/${CIRRUS_WORKING_DIR}
- ${CIRRUS_WORKING_DIR}/tools/ravynOS/build.sh base basepkg
- cloudsmith push raw -k $KEY ravynsoft/ravynOS --name base_${CIRRUS_BRANCH%/*}.txz /usr/obj/${CIRRUS_WORKING_DIR}/${PLATFORM}/release/base.txz
- rm -rfv /usr/obj/${CIRRUS_WORKING_DIR}/${PLATFORM}/release/dist/base/usr/share/locale/nn_NO.*
upload_caches:
- tmp
- release
only_if: $CIRRUS_BRANCH == 'main' || $CIRRUS_BRANCH == 'staging'
depends_on:
- kernel
kernel_task:
environment:
PKG_CONFIG_PATH: /usr/libdata/pkgconfig:/usr/local/libdata/pkgconfig
IGNORE_OSVERSION: yes
clone_script: |
pkg update
pkg install -yf git-tiny
if [ -z "$CIRRUS_PR" ]; then
git clone --recursive --branch=$CIRRUS_BRANCH https://x-access-token:${CIRRUS_REPO_CLONE_TOKEN}@github.com/${CIRRUS_REPO_FULL_NAME}.git $CIRRUS_WORKING_DIR
git reset --hard $CIRRUS_CHANGE_IN_REPO
else
git clone --recursive https://x-access-token:${CIRRUS_REPO_CLONE_TOKEN}@github.com/${CIRRUS_REPO_FULL_NAME}.git $CIRRUS_WORKING_DIR
git fetch origin pull/$CIRRUS_PR/head:pull/$CIRRUS_PR
git reset --hard $CIRRUS_CHANGE_IN_REPO
fi
setup_script:
- pkg remove -fy zstd
- pkg install -fy python311 python3 py311-pip py311-setuptools
- pip install --upgrade cloudsmith-cli
- echo "PLATFORM=$(uname -m).$(uname -p)" >> ${CIRRUS_ENV}
#- git clone https://github.com/ravynsoft/drm-kmod.git
sys_cache:
folder: /usr/obj/${CIRRUS_WORKING_DIR}/*/sys
fingerprint_key: ${CIRRUS_BUILD_ID}_sys
reupload_on_changes: true
release_cache:
folder: /usr/obj/${CIRRUS_WORKING_DIR}/*/release
fingerprint_key: ${CIRRUS_BUILD_ID}_release
reupload_on_changes: true
kernel_build_script:
- mkdir -p /usr/obj/${CIRRUS_WORKING_DIR}
#- ${CIRRUS_WORKING_DIR}/tools/ravynOS/build.sh kernel drm kernelpkg
- ${CIRRUS_WORKING_DIR}/tools/ravynOS/build.sh kernel kernelpkg
- cloudsmith push raw -k $KEY ravynsoft/ravynOS --name kernel_${CIRRUS_BRANCH%/*}.txz /usr/obj/${CIRRUS_WORKING_DIR}/${PLATFORM}/release/kernel.txz
upload_caches:
- sys
- release
only_if: $CIRRUS_BRANCH == 'main' || $CIRRUS_BRANCH == 'staging'
system_task:
environment:
PKG_CONFIG_PATH: /usr/libdata/pkgconfig:/usr/local/libdata/pkgconfig
IGNORE_OSVERSION: yes
id_rsa_priv_file:
path: /root/.ssh/id_rsa
variable_name: MIRROR2_SSH_PRIVKEY
id_rsa_pub_file:
path: /root/.ssh/id_rsa.pub
variable_name: MIRROR2_SSH_PUBKEY
clone_script: |
pkg update
pkg install -yf git-tiny bison
if [ -z "$CIRRUS_PR" ]; then
git clone --recursive --branch=$CIRRUS_BRANCH https://x-access-token:${CIRRUS_REPO_CLONE_TOKEN}@github.com/${CIRRUS_REPO_FULL_NAME}.git $CIRRUS_WORKING_DIR
git reset --hard $CIRRUS_CHANGE_IN_REPO
else
git clone --recursive https://x-access-token:${CIRRUS_REPO_CLONE_TOKEN}@github.com/${CIRRUS_REPO_FULL_NAME}.git $CIRRUS_WORKING_DIR
git fetch origin pull/$CIRRUS_PR/head:pull/$CIRRUS_PR
git reset --hard $CIRRUS_CHANGE_IN_REPO
fi
setup_script:
- pkg remove -fy zstd
- pkg install -fy python311 python3 py311-pip py311-setuptools
- echo "PLATFORM=$(uname -m).$(uname -p)" >> ${CIRRUS_ENV}
sys_cache:
folder: /usr/obj/${CIRRUS_WORKING_DIR}/*/sys
fingerprint_key: ${CIRRUS_BUILD_ID}_sys
reupload_on_changes: false
tmp_cache:
folder: /usr/obj/${CIRRUS_WORKING_DIR}/*/tmp
fingerprint_key: ${CIRRUS_BUILD_ID}_tmp
reupload_on_changes: false
release_cache:
folder: /usr/obj/${CIRRUS_WORKING_DIR}/*/release
fingerprint_key: ${CIRRUS_BUILD_ID}_release
reupload_on_changes: false
system_build_script:
- mkdir -p /usr/obj/${CIRRUS_WORKING_DIR}/${PLATFORM}
- cp -afv ${CIRRUS_WORKING_DIR}/usr/obj/${CIRRUS_WORKING_DIR}/${PLATFORM}/ /usr/obj/${CIRRUS_WORKING_DIR}/${PLATFORM}/
- ln -sf ${CIRRUS_WORKING_DIR}/sys /usr/obj/${CIRRUS_WORKING_DIR}/${PLATFORM}/tmp/sys
- ${CIRRUS_WORKING_DIR}/tools/ravynOS/build.sh system extras systempkg
iso_script:
- echo >> /root/.ssh/id_rsa
- chmod 600 /root/.ssh/id_rsa
- pkg install -y sshpass
- cp -fv version.txt ISO/overlays/ramdisk/version
- mkdir -p /usr/local/furybsd/$(uname -m)/cache/$(head -1 version.txt)/base
- cp -fv /usr/obj/${CIRRUS_WORKING_DIR}/${PLATFORM}/release/base.txz /usr/obj/${CIRRUS_WORKING_DIR}/${PLATFORM}/release/kernel.txz ${CIRRUS_WORKING_DIR}/dist/ravynOS.txz /usr/local/furybsd/$(uname -m)/cache/$(head -1 version.txt)/base/
- cd ISO; IGNORE_OSVERSION=yes RAVYNOS=${CIRRUS_WORKING_DIR} ./build.sh ravynOS ravynOS_$(head -1 ../version.txt)
- SSHPASS="${MIRROR1_PASS}" sshpass -e scp -o StrictHostKeyChecking=no ${CIRRUS_WORKING_DIR}/artifacts/*.iso* ${MIRROR1_USER}@${MIRROR1_HOST}:www/nightly/
- #scp -P2200 -o StrictHostKeyChecking=no ${CIRRUS_WORKING_DIR}/artifacts/*.iso* ${MIRROR1_USER}@${MIRROR2_HOST}:nightly/
- date -u +'%s' > timestamp
- SSHPASS="${MIRROR1_PASS}" sshpass -e scp -o StrictHostKeyChecking=no timestamp ${MIRROR1_USER}@${MIRROR1_HOST}:www/
- #scp -P2200 -o StrictHostKeyChecking=no timestamp ${MIRROR1_USER}@${MIRROR2_HOST}:
only_if: $CIRRUS_BRANCH == 'main' || $CIRRUS_BRANCH == 'staging'
depends_on:
- base
- kernel
ravynOS_artifacts:
path: dist/ravynOS.txz