Skip to content

Commit

Permalink
[CI] Add new DEB workflow to GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
amadio committed Aug 17, 2023
1 parent e341788 commit 4283a06
Showing 1 changed file with 101 additions and 0 deletions.
101 changes: 101 additions & 0 deletions .github/workflows/DEB.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
name: DEB

on:
push:
branches:
- devel
- debian*
- linux*
- master
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
DEBIAN_FRONTEND: noninteractive

jobs:
debian:
name: Debian
runs-on: ubuntu-latest
container: debian:12

steps:
- name: Install git
run: apt update -qq && apt install -y git

- name: Clone repository
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Install Debian development tools
run: apt install -y build-essential devscripts

- name: Install XRootD build dependencies
run: yes | mk-build-deps --install --remove debian/control

- name: Build DEBs
run: |
VERSION=$(git describe --match 'v*' | sed -e 's/v//; s/-rc/~rc/; s/-g/+git/; s/-/.post/; s/-/./')
dch -v ${VERSION} -M 'XRootD automated build.'
debuild --no-tgz-check --no-sign -b
- name: Install DEBs
run: apt install ../*.deb

- name: Run post-install checks
run: |
command -v xrdcp
xrdcp --version
command -v xrootd
xrootd -H
python3 -m pip show xrootd
python3 -c 'from XRootD import client; help(client)'
python3 -c 'import XRootD; print(XRootD)'
python3 -c 'import pyxrootd; print(pyxrootd)'
python3 -c 'from XRootD import client; print(client.FileSystem("root://localhost"))'
ubuntu:
name: Ubuntu
runs-on: ubuntu-latest

steps:
- name: Install git
run: sudo apt update -qq && sudo apt install -y git

- name: Clone repository
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Install Debian development tools
run: |
sudo apt install -y build-essential devscripts equivs
- name: Install XRootD build dependencies
run: |
yes | mk-build-deps --install --remove -s sudo debian/control
- name: Build DEBs
run: |
VERSION=$(git describe --match 'v*' | sed -e 's/v//; s/-rc/~rc/; s/-g/+git/; s/-/.post/; s/-/./')
dch -v ${VERSION} -M 'XRootD automated build.'
debuild --no-tgz-check --no-sign -b
- name: Install DEBs
run: apt install ../*.deb

- name: Run post-install checks
run: |
command -v xrdcp
xrdcp --version
command -v xrootd
xrootd -H
python3 -m pip show xrootd
python3 -c 'from XRootD import client; help(client)'
python3 -c 'import XRootD; print(XRootD)'
python3 -c 'import pyxrootd; print(pyxrootd)'
python3 -c 'from XRootD import client; print(client.FileSystem("root://localhost"))'

0 comments on commit 4283a06

Please sign in to comment.