Skip to content

Commit

Permalink
Merge pull request #80 from Achiefs/79-xenial-support
Browse files Browse the repository at this point in the history
Include Ubuntu Xenial support and CentOS 7 package build test
  • Loading branch information
okynos committed Dec 28, 2022
2 parents 328967a + ee30b76 commit c8b5e75
Show file tree
Hide file tree
Showing 7 changed files with 62 additions and 4 deletions.
20 changes: 18 additions & 2 deletions .github/workflows/pkg-build-workflow.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Pkg build
on: [push]
jobs:
Pkg-build-ubuntu:
Pkg-build-ubuntu20:
runs-on: ubuntu-20.04
steps:
- name: Check out repository code, branch='${{ github.ref }}'
Expand Down Expand Up @@ -29,4 +29,20 @@ jobs:
run: Invoke-Expression "& `"C:\Program Files (x86)\WiX Toolset v3.11\bin\candle.exe`" pkg\msi\fim.wxs -o pkg\msi\fim.wixobj"
- name: Building package
run: Invoke-Expression "& `"C:\Program Files (x86)\WiX Toolset v3.11\bin\light.exe`" -ext WixUIExtension pkg\msi\fim.wixobj -b pkg\msi"
- run: echo "Job's status is ${{ job.status }}."
- run: echo "Job's status is ${{ job.status }}."

Pkg-build-ubuntu16:
runs-on: [self-hosted, ubuntu18]
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Ubuntu 16.04 - package build
run: sudo docker run okynos/fim-builder:xenial ${{ github.ref_name }}

Pkg-build-centos7:
runs-on: [self-hosted, ubuntu18]
steps:
- name: Check out code
uses: actions/checkout@v2
- name: CentOS 7 - package build
run: sudo docker run okynos/fim-builder:centos7 ${{ github.ref_name }}
2 changes: 1 addition & 1 deletion pkg/deb/debian/changelog
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
fim (0.4.3-1) bionic; urgency=medium
fim (0.4.3-1) xenial; urgency=medium

* More info: https://github.com/Achiefs/fim/releases/tag/v0.4.3

Expand Down
2 changes: 1 addition & 1 deletion pkg/deb/debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Source: fim
Section: admin
Priority: optional
Maintainer: Jose Fernandez <support@achiefs.com>
Build-Depends: debhelper (>=10), dh-systemd
Build-Depends: debhelper (>=9), dh-systemd
Standards-Version: 4.0.0
Homepage: https://github.com/Achiefs/fim

Expand Down
10 changes: 10 additions & 0 deletions pkg/deb/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM ubuntu:xenial

RUN echo 'Acquire::Retries "3";' > /etc/apt/apt.conf.d/80-retries && \
sed -i 's|deb http://security|#deb http://security|g' /etc/apt/sources.list && \
apt update && \
apt install -y curl devscripts equivs tar gcc gzip pkg-config git

ADD entrypoint.sh /usr/local/bin/entrypoint.sh

ENTRYPOINT [ "/usr/local/bin/entrypoint.sh" ]
12 changes: 12 additions & 0 deletions pkg/deb/docker/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

ref=$1

mkdir -p /tmp/output
mkdir -p /tmp/repo
cd /tmp/repo
git clone https://github.com/Achiefs/fim.git -b ${ref} --depth=1
cd fim/pkg/deb
./builder.sh
cp fim_*.deb /tmp/output/
chown 1000:1000 /tmp/output/*
8 changes: 8 additions & 0 deletions pkg/rpm/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM centos:7

RUN yum update -y && \
yum install -y rpm-build tar gcc git

ADD entrypoint.sh /usr/local/bin/entrypoint.sh

ENTRYPOINT [ "/usr/local/bin/entrypoint.sh" ]
12 changes: 12 additions & 0 deletions pkg/rpm/docker/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

ref=$1

mkdir -p /tmp/output
mkdir -p /tmp/repo
cd /tmp/repo
git clone https://github.com/Achiefs/fim.git -b ${ref} --depth=1
cd fim/pkg/rpm
./builder.sh
cp fim-*.rpm /tmp/output/
chown 1000:1000 /tmp/output/*

0 comments on commit c8b5e75

Please sign in to comment.