Skip to content

Issue #86: xdg-configure update #159

Issue #86: xdg-configure update

Issue #86: xdg-configure update #159

Workflow file for this run

name: ci
on: [push]
jobs:
build-test:
name: Build and Test
runs-on: ubuntu-latest
container: ${{ matrix.image }}
strategy:
matrix:
include:
- image: almalinux:latest
- image: almalinux:9
- image: alpine:latest
- image: quay.io/centos/centos:centos7
- image: quay.io/centos/centos:stream8
- image: quay.io/centos/centos:stream9
- image: debian:latest
- image: fedora:latest
- image: registry.access.redhat.com/ubi9/ubi
- image: rockylinux:8
- image: rockylinux:9
- image: ubuntu:20.04
- image: ubuntu:latest
- image: ubuntu:rolling
env:
DEBIAN_FRONTEND: noninteractive
GNULIB_REFDIR: "$HOME/.gnulib"
GNULIB_URL: 'https://github.com/coreutils/gnulib.git'
LD_LIBRARY_PATH: '/opt/rh/httpd24/root/usr/lib64'
USER: ${{ github.repository_owner }}
steps:
- name: Upgrade Packages
run: |
. /etc/os-release
case $ID in
alpine) apk update && apk upgrade && apk add git tar;;
almalinux|centos|rocky)
case $VERSION_ID in
7)
yum -y install centos-release-scl dnf dnf-plugins-core
dnf -y upgrade && dnf -y install rh-git227-git-core which
echo /opt/rh/rh-git227/root/usr/bin >>$GITHUB_PATH
;;
*) dnf -y upgrade && dnf -y install dnf-plugins-core git-core which;;
esac
;;
fedora|rhel) dnf -y upgrade && dnf -y install dnf-plugins-core git-core which;;
debian|ubuntu) apt-get -y update && apt-get -y upgrade && apt-get -y install git;;
esac
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
# This step addresses issues with actions/checkout
# see: https://github.com/actions/checkout/issues/290
# see: https://github.com/actions/checkout/issues/915
- name: Post Checkout Hacks
run: |
git config --global --add safe.directory $(pwd)
git fetch --force --tags
- name: Configure Gnulib Cache Key
run: echo "GNULIB_CACHE_KEY=`git submodule status .gnulib | sed -re 's/^.([0-9,a-f]{1,}) .*$/\1/'`" >>$GITHUB_ENV
- name: Cache Gnulib Repository
id: cache-gnulib
uses: actions/cache@v3
env:
cache-name: cache-gnulib
with:
path: ${{ env.GNULIB_REFDIR }}
key: ${{ runner.os }}-${{ env.cache-name }}-${{ env.GNULIB_CACHE_KEY }}
restore-keys: |
${{ runner.os }}-${{ env.cache-name }}-
- name: Fetch Upstream Gnulib Repository
if: steps.cache-gnulib.outputs.cache-hit != 'true'
run: |
if [ -d $GNULIB_REFDIR ]; then
cd $GNULIB_REFDIR
git pull --ff-only
else
git clone $GNULIB_URL $GNULIB_REFDIR
fi
- name: Bootstrap
run: ./bootstrap --install-buildreqs --install-reqs
- name: Configure
run: ./configure --prefix=$RUNNER_TEMP/.local --sysconfdir=$RUNNER_TEMP/.config
- name: Build
run: make
- name: Distribution Test
run: make distcheck
# FIXME: figure out why vim-plug PlugInstall is failing on CentOS 7
- name: Install
if: endsWith(matrix.image, 'centos7') != true
run: make install
# FIXME: figure out why vim-plug PlugInstall is failing on CentOS 7
- name: Integration Test
if: endsWith(matrix.image, 'centos7') != true
run: |
find $RUNNER_TEMP/.config/vim/$HOSTNAME/plugged/YouCompleteMe -name 'ycm_core*.so' | grep .
- name: Configure Project Name and Version
run: |
echo "PROJECT_NAME=`cat .package-name`" >>$GITHUB_ENV
echo "PROJECT_VERSION=`cat .version`" >>$GITHUB_ENV
- name: Upload Distribution Artifacts
uses: actions/upload-artifact@v3
with:
name: distribution-artifacts
if-no-files-found: error
path: |
${{ env.PROJECT_NAME }}-${{ env.PROJECT_VERSION }}.tar.gz
.package-name
.version
create-release:
name: Create Release
runs-on: ubuntu-latest
needs: build-test
if: startsWith(github.ref, 'refs/tags/v')
steps:
- name: Download Distribution Artifacts
uses: actions/download-artifact@v3
with:
name: distribution-artifacts
- name: Configure Project Name and Version
run: |
echo "PROJECT_NAME=`cat .package-name`" >>$GITHUB_ENV
echo "PROJECT_VERSION=`cat .version`" >>$GITHUB_ENV
- name: Create Release
id: create-release
uses: softprops/action-gh-release@v1
with:
name: Release ${{ env.PROJECT_VERSION }}
files: ${{ env.PROJECT_NAME }}-${{ env.PROJECT_VERSION }}.tar.gz
fail_on_unmatched_files: true