Skip to content

Commit

Permalink
Added Alpine 3.17/gcc 12 build to GitHub Actions CI. Fixed misspellin…
Browse files Browse the repository at this point in the history
…gs of ubuntu.
  • Loading branch information
esabol committed Nov 21, 2022
1 parent c5bfad1 commit 00f28ce
Showing 1 changed file with 37 additions and 15 deletions.
52 changes: 37 additions & 15 deletions .github/workflows/c-cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,28 +17,39 @@ jobs:
fail-fast: false
matrix:
config:
- {name: 'ubuntu-14.04 gcc-4.8', os: ubuntu-latest, container: 'ubuntu:14.04', cc: 'gcc', cxx: 'g++', tag: '4.8', toolchain: 'ppa:ubuntu-toolchain-r/test'}
- {name: 'ubuntu-14.04 gcc-4.9', os: ubuntu-latest, container: 'ubuntu:14.04', cc: 'gcc', cxx: 'g++', tag: '4.9', toolchain: 'ppa:ubuntu-toolchain-r/test'}
- {name: 'ubtunu-18.04 gcc-5', os: ubuntu-18.04, cc: 'gcc', cxx: 'g++', tag: '5'}
- {name: 'ubtunu-18.04 gcc-6', os: ubuntu-18.04, cc: 'gcc', cxx: 'g++', tag: '6'}
- {name: 'ubtunu-18.04 gcc-7', os: ubuntu-18.04, cc: 'gcc', cxx: 'g++', tag: '7'}
- {name: 'ubtunu-18.04 gcc-8', os: ubuntu-18.04, cc: 'gcc', cxx: 'g++', tag: '8'}
- {name: 'ubtunu-20.04 gcc-9', os: ubuntu-20.04, cc: 'gcc', cxx: 'g++', tag: '9'}
- {name: 'ubtunu-20.04 gcc-10', os: ubuntu-20.04, cc: 'gcc', cxx: 'g++', tag: '10'}
- {name: 'ubtunu-22.04 gcc-11', os: ubuntu-20.04, cc: 'gcc', cxx: 'g++', tag: '11'}
- {name: 'ubuntu-14.04 gcc-4.8', os: ubuntu-latest, container: 'ubuntu:14.04', cc: 'gcc-4.8', cxx: 'g++-4.8', tag: '4.8', toolchain: 'ppa:ubuntu-toolchain-r/test'}
- {name: 'ubuntu-14.04 gcc-4.9', os: ubuntu-latest, container: 'ubuntu:14.04', cc: 'gcc-4.9', cxx: 'g++-4.9', tag: '4.9', toolchain: 'ppa:ubuntu-toolchain-r/test'}
- {name: 'ubuntu-18.04 gcc-5', os: ubuntu-18.04, cc: 'gcc-5', cxx: 'g++-5', tag: '5'}
- {name: 'ubuntu-18.04 gcc-6', os: ubuntu-18.04, cc: 'gcc-6', cxx: 'g++-6', tag: '6'}
- {name: 'ubuntu-18.04 gcc-7', os: ubuntu-18.04, cc: 'gcc-7', cxx: 'g++-7', tag: '7'}
- {name: 'ubuntu-18.04 gcc-8', os: ubuntu-18.04, cc: 'gcc-8', cxx: 'g++-8', tag: '8'}
- {name: 'ubuntu-20.04 gcc-9', os: ubuntu-20.04, cc: 'gcc-9', cxx: 'g++-9', tag: '9'}
- {name: 'ubuntu-20.04 gcc-10', os: ubuntu-20.04, cc: 'gcc-10', cxx: 'g++-10', tag: '10'}
- {name: 'ubuntu-22.04 gcc-11', os: ubuntu-20.04, cc: 'gcc-11', cxx: 'g++-11', tag: '11'}
- {name: 'alpine-3.17 gcc-12', os: ubuntu-latest, container: 'alpine:3.17', cc: 'gcc', cxx: 'g++', tag: '12'}

env:
CC: ${{ matrix.config.cc }}-${{ matrix.config.tag }}
CXX: ${{ matrix.config.cxx }}-${{ matrix.config.tag }}
CC: ${{ matrix.config.cc }}
CXX: ${{ matrix.config.cxx }}
GHA_CONTAINER: ${{ matrix.config.container }}
GHA_CONFIG_NAME: ${{ matrix.config.name }}

steps:
- name: if running in a container, update and install sudo, git, and other basics
if: matrix.config.container != ''
run: |
apt-get -o Acquire::Retries=3 update && DEBIAN_FRONTEND=noninteractive apt-get -o Acquire::Retries=3 -y install tzdata sudo apt-transport-https make apt-file software-properties-common libssl-dev build-essential autotools-dev autoconf automake pkgconf
sudo apt-add-repository ppa:git-core/ppa
sudo apt-get -o Acquire::Retries=3 update && apt-get -o Acquire::Retries=3 -y install git
case "${GHA_CONTAINER}" in
ubuntu*)
apt-get -o Acquire::Retries=3 update && DEBIAN_FRONTEND=noninteractive apt-get -o Acquire::Retries=3 -y install tzdata sudo apt-transport-https make apt-file software-properties-common libssl-dev build-essential autotools-dev autoconf automake pkgconf
sudo apt-add-repository ppa:git-core/ppa
sudo apt-get -o Acquire::Retries=3 update && apt-get -o Acquire::Retries=3 -y install git
;;
alpine*)
apk add --no-cache make gcc g++ autoconf automake m4 bash git libtool file git py3-sphinx util-linux-dev libuuid libevent-dev gperf boost-dev openssl-dev
;;
*)
;;
esac
- name: override DNS to fix IP address for hostname in some Docker containers
if: matrix.config.container == 'ubuntu:14.04'
run: |
Expand Down Expand Up @@ -66,6 +77,10 @@ jobs:
sudo apt-get update
sudo apt-get -y install libtool
- uses: actions/checkout@v3
- name: set ownership of git repository in Docker containers
if: matrix.config.container != ''
run: |
chown -R $(id -u):$(id -g) .
- name: tweak multi_client_test.cc for container usage
if: matrix.config.container == 'ubuntu:14.04'
run: |
Expand All @@ -80,7 +95,13 @@ jobs:
echo "==="
- name: install dependencies
run: |
sudo apt-get update && sudo apt-get -o Acquire::Retries=3 install -y libboost-all-dev gperf libevent-dev uuid-dev sphinx-doc sphinx-common libhiredis-dev ${{ matrix.config.cc }}-${{ matrix.config.tag }} ${{ matrix.config.cxx }}-${{ matrix.config.tag }}
case "${GHA_CONFIG_NAME}" in
ubuntu*)
sudo apt-get update && sudo apt-get -o Acquire::Retries=3 install -y libboost-all-dev gperf libevent-dev uuid-dev sphinx-doc sphinx-common libhiredis-dev ${{ matrix.config.cc }}-${{ matrix.config.tag }} ${{ matrix.config.cxx }}-${{ matrix.config.tag }}
;;
*)
;;
esac
- name: bootstrap
run: |
if [ -n "$GHA_CONTAINER" ]; then
Expand All @@ -92,6 +113,7 @@ jobs:
./bootstrap.sh -a
- name: configure
run: ./configure --enable-ssl
shell: bash
- name: make
run: ${CC} --version && make
- name: make test
Expand Down

0 comments on commit 00f28ce

Please sign in to comment.