-
-
Notifications
You must be signed in to change notification settings - Fork 158
172 lines (171 loc) · 5.44 KB
/
pkgbuild.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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
name: CI/CD Dev Build Deployment
on:
push:
branches:
- dev/**
- lts/**
jobs:
debbuild:
name: Debian
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Install Pre-requisites
run: |
sudo apt-get update -qq
sudo apt-get install -qq apt-utils build-essential gzip devscripts debhelper bats
- name: Build Debian Package
run: |
git clone https://github.com/wslutilities/wslu-debian builder
cd builder/
bash ./build.sh --ci dev debian unstable
cd ../
mkdir -p ./pkgs
mv ../wsl*.* ./pkgs
- uses: actions/upload-artifact@v1
with:
name: DebianDEBs
path: pkgs
pgwbuild:
name: Pengwin
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Install Pre-requisites
run: |
sudo apt-get update -qq
sudo apt-get install -qq apt-utils build-essential gzip devscripts debhelper bats
- name: Build Debian Package
run: |
git clone https://github.com/wslutilities/wslu-debian builder
cd builder/
bash ./build.sh --ci dev pengwin
cd ../
mkdir -p ./pkgs
mv ../wsl*.* ./pkgs
- uses: actions/upload-artifact@v1
with:
name: PengwinDEBs
path: pkgs
pgwspdeploy:
name: Pengwin Deploying
needs: pgwbuild
runs-on: ubuntu-20.04
container: circleci/ruby:2.3-jessie
steps:
- name: Retrive package for deployment
uses: actions/download-artifact@v1
with:
name: PengwinDEBs
- run: gem install package_cloud
- name: deploy to the dev
env:
PACKAGECLOUD_TOKEN: ${{ secrets.PGW_DEV_DEPLOY_KEY }}
run: package_cloud push whitewaterfoundry/wslu/debian/bullseye ./PengwinDEBs/*.deb --skip-errors
rpmobsbuild:
name: RPM - OpenSUSE Build Service
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Install Pre-requisites
run: |
sudo apt-get update -qq
sudo apt-get install -qq build-essential tar
- name: configure
run: |
bash ./configure.sh --rpm obs_canary
cp extras/build/rpm/obs/wslu.spec ../wslu-canary.spec
rm -rf *
mkdir -p SOURCES
mkdir -p SPECS
cp ../wslu-*.tar.gz SOURCES
cp ../wslu-canary.spec SPECS
- name: rpmbuild
uses: ./.github/actions/rpmbuild/
- name: moving files
run: |
mkdir obs_res
cp ../wslu-*.tar.gz obs_res
cp ../wslu-canary.spec obs_res
- uses: actions/upload-artifact@v1
with:
name: OBS_RES
path: obs_res
obsdeploy:
name: OpenSUSE Build Service Deploying
needs: rpmobsbuild
runs-on: ubuntu-latest
steps:
- name: Retrive package for deployment
uses: actions/download-artifact@v1
with:
name: OBS_RES
- name: Install Pre-requisites
run: |
sudo apt-get update -qq
sudo apt-get install -qq osc python3-m2crypto
- name: Install API token for osc
env:
API_TOKEN_CONTENT: ${{ secrets.OBS_API_TOKEN }}
run: |
mkdir -p "$HOME/.config/osc"
echo -e "[general]\napiurl = https://api.opensuse.org\n[https://api.opensuse.org]\nuser = wslutilities\npass = $API_TOKEN_CONTENT" > "$HOME/.config/osc/oscrc"
- name: Uploading OBS source files
run: |
osc checkout home:wslutilities
cp OBS_RES/* home:wslutilities/wslu-canary/
cd home:wslutilities/wslu-canary/
osc addremove
osc commit -m "Build at $(date)"
rpmcoprbuild:
name: RPM - Cool Other Package Repo
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Install Pre-requisites
run: |
sudo apt-get update -qq
sudo apt-get install -qq build-essential tar
- name: configure
run: |
bash ./configure.sh --rpm copr
cp extras/build/rpm/copr/wslu.spec ../wslu.spec
rm -rf *
mkdir -p SOURCES
mkdir -p SPECS
cp ../wslu-*.tar.gz SOURCES
cp ../wslu.spec SPECS
- name: rpmbuild
uses: ./.github/actions/rpmbuild/
- name: moving files
run: |
mkdir compiled_rpms
cp SRPMS/* compiled_rpms
cp RPMS/noarch/* compiled_rpms
#uses: robertdebock/[email protected]
- uses: actions/upload-artifact@v1
with:
name: COPRRPMs
path: compiled_rpms
coprdeploy:
name: Cool Other Package Repo Deploying
needs: rpmcoprbuild
container: fedora:latest
runs-on: ubuntu-latest
steps:
- name: Retrive package for deployment
uses: actions/download-artifact@v1
with:
name: COPRRPMs
- name: Install API token for copr-cli
env:
API_TOKEN_CONTENT: ${{ secrets.COPR_API_TOKEN }}
run: |
mkdir -p "$HOME/.config"
echo "$API_TOKEN_CONTENT" > "$HOME/.config/copr"
- name: Install tooling for source RPM build
run: |
dnf -y install @development-tools @rpm-development-tools
dnf -y install copr-cli make
- name: Submit the build by uploading the source RPM
run: copr-cli build wslutilities/wslu-canary COPRRPMs/*.src.rpm