Skip to content

Commit 695f5c0

Browse files
committed
Migrate to github actions.
1 parent 05a6117 commit 695f5c0

3 files changed

Lines changed: 106 additions & 103 deletions

File tree

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
name: Build debian packages
2+
3+
on:
4+
release:
5+
types:
6+
- published
7+
8+
env:
9+
DEBIAN_FRONTEND: noninteractive
10+
11+
jobs:
12+
debian-package-amd64:
13+
name: "${{ matrix.distro }} ${{ matrix.release }} ${{ matrix.arch }}"
14+
runs-on: ubuntu-latest
15+
environment:
16+
name: "release"
17+
strategy:
18+
matrix:
19+
include:
20+
- distro: "debian"
21+
release: "buster"
22+
arch: "amd64"
23+
- distro: "debian"
24+
release: "bullseye"
25+
arch: "amd64"
26+
- distro: "ubuntu"
27+
release: "bionic"
28+
arch: "amd64"
29+
- distro: "ubuntu"
30+
release: "focal"
31+
arch: "amd64"
32+
container:
33+
image: ${{ matrix.distro }}:${{ matrix.release }}
34+
steps:
35+
- name: Checkout repo
36+
uses: actions/checkout@v2
37+
- name: Install dependencies
38+
run: |
39+
apt-get update
40+
apt-get -y upgrade
41+
apt-get -y install devscripts dpkg-dev debhelper equivs
42+
- name: Bump version
43+
run: |
44+
export DEBEMAIL='maintainers@faucet.nz'
45+
export DEBFULLNAME='Faucet Maintainers'
46+
debchange --newversion ${{ github.event.release.tag_name }} -b "New upstream release"
47+
- name: Build package
48+
run: |
49+
mk-build-deps -i -r -t 'apt-get -f -y --force-yes'
50+
dpkg-buildpackage -b -us -uc -rfakeroot
51+
- name: Store package
52+
run: |
53+
artifact_dir=${{ matrix.distro }}_${{ matrix.release }}
54+
mkdir -p packages/${artifact_dir}
55+
cp ../*.deb packages/${artifact_dir}
56+
- name: Publish package on packagecloud
57+
uses: faucetsdn/action-packagecloud-upload-debian-packages@v1
58+
with:
59+
path: packages/
60+
repo: faucetsdn/faucet-test
61+
token: ${{ secrets.PACKAGECLOUD_TOKEN }}
62+
63+
debian-package-other:
64+
name: "${{ matrix.distro }} ${{ matrix.release }} ${{ matrix.arch }}"
65+
runs-on: ubuntu-latest
66+
environment:
67+
name: "release"
68+
strategy:
69+
matrix:
70+
distro: [raspbian]
71+
release: [buster, bullseye]
72+
arch: [armv7, aarch64]
73+
steps:
74+
- name: Checkout repo
75+
uses: actions/checkout@v2
76+
- uses: uraimo/run-on-arch-action@v2.1.1
77+
name: Build artifact
78+
id: build
79+
with:
80+
arch: ${{ matrix.arch }}
81+
distro: ${{ matrix.release }}
82+
setup: |
83+
mkdir -p "${PWD}/packages"
84+
dockerRunArgs: |
85+
--volume "${PWD}/packages:/packages"
86+
env: |
87+
artifact_dir: ${{ matrix.distro }}_${{ matrix.release }}
88+
shell: /bin/bash
89+
install: |
90+
apt-get update
91+
apt-get -y upgrade
92+
apt-get -y install devscripts dpkg-dev debhelper equivs
93+
run: |
94+
export DEBEMAIL='maintainers@faucet.nz'
95+
export DEBFULLNAME='Faucet Maintainers'
96+
debchange --newversion ${{ github.event.release.tag_name }} -b "New upstream release"
97+
mk-build-deps -i -r -t 'apt-get -f -y --force-yes'
98+
dpkg-buildpackage -b -us -uc -rfakeroot
99+
mkdir -p /packages/${artifact_dir}
100+
cp ../*.deb /packages/${artifact_dir}
101+
- name: Publish package on packagecloud
102+
uses: faucetsdn/action-packagecloud-upload-debian-packages@v1
103+
with:
104+
path: packages/
105+
repo: faucetsdn/faucet-test
106+
token: ${{ secrets.PACKAGECLOUD_TOKEN }}

.gitlab-ci.yml

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

gitlab-build.sh

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

0 commit comments

Comments
 (0)