mktar.pl: get version from the configure.ac file #106
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Ubuntu sandbox | |
on: [push, pull_request] | |
jobs: | |
build_job: | |
# The host should always be linux | |
runs-on: ubuntu-22.04 | |
name: Build on ${{ matrix.distro }} ${{ matrix.arch }} | |
# Run steps on a matrix of 4 arch/distro combinations | |
strategy: | |
matrix: | |
include: | |
- arch: aarch64 | |
distro: ubuntu22.04 | |
# - arch: aarch64 | |
# distro: bullseye | |
# - arch: ppc64le | |
# distro: alpine_latest | |
# - arch: none | |
# distro: none | |
# base_image: riscv64/busybox | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: uraimo/[email protected] | |
name: Build artifact | |
id: build | |
with: | |
arch: ${{ matrix.arch }} | |
distro: ${{ matrix.distro }} | |
# Not required, but speeds up builds | |
githubToken: ${{ github.token }} | |
# Create an artifacts directory | |
setup: | | |
mkdir -p "${PWD}/artifacts" | |
# Mount the artifacts directory as /artifacts in the container | |
dockerRunArgs: | | |
--volume "${PWD}/artifacts:/artifacts" | |
# Pass some environment variables to the container | |
env: | # YAML, but pipe character is necessary | |
artifact_name: git-${{ matrix.distro }}_${{ matrix.arch }} | |
# The shell to run commands with in the container | |
shell: /bin/sh | |
# Install some dependencies in the container. This speeds up builds if | |
# you are also using githubToken. Any dependencies installed here will | |
# be part of the container image that gets cached, so subsequent | |
# builds don't have to re-install them. The image layer is cached | |
# publicly in your project's package repository, so it is vital that | |
# no secrets are present in the container state or logs. | |
install: | | |
case "${{ matrix.distro }}" in | |
ubuntu*|jessie|stretch|buster|bullseye) | |
echo "-----------------------------------------------------" | |
echo "uname -a" | |
uname -a | |
echo "-----------------------------------------------------" | |
echo "cat /etc/issue" | |
cat /etc/issue | |
echo "-----------------------------------------------------" | |
echo "apt-get update -q -y" | |
apt-get update -q -y | |
echo "-----------------------------------------------------" | |
echo "apt-get install -q -y git libpam0g-dev autoconf make gcc clang" | |
apt-get install -q -y git libpam0g-dev autoconf make gcc clang | |
echo "-----------------------------------------------------" | |
echo "autoconf --version" | |
autoconf --version | |
echo "-----------------------------------------------------" | |
echo "make -v" | |
make -v | |
echo "-----------------------------------------------------" | |
echo "gcc -v" | |
gcc -v | |
echo "-----------------------------------------------------" | |
echo "clang -v" | |
clang -v | |
echo "-----------------------------------------------------" | |
echo "git clone" | |
git clone https://github.com/alexander-naumov/gnu-screen.git | |
echo "-----------------------------------------------------" | |
echo "cd gnu-screen/src/" | |
cd gnu-screen/src | |
echo "-----------------------------------------------------" | |
echo "./autogen.sh" | |
./autogen.sh | |
echo "-----------------------------------------------------" | |
echo "cc=gcc ./configure CFLAGS='-Wall'" | |
cc=gcc ./configure CFLAGS="-Wall" | |
echo "-----------------------------------------------------" | |
echo "make" | |
make | |
echo "-----------------------------------------------------" | |
echo "./screen -v" | |
./screen -v | |
echo "-----------------------------------------------------" | |
echo "./screen -ls" | |
./screen -ls || echo $? | |
echo "-----------------------------------------------------" | |
echo "make clean" | |
make clean | |
echo "-----------------------------------------------------" | |
echo "cc=clang ./configure CFLAGS='-Wall'" | |
cc=clang ./configure CFLAGS="-Wall" | |
echo "-----------------------------------------------------" | |
echo "make" | |
make | |
echo "-----------------------------------------------------" | |
echo "./screen -v" | |
./screen -v | |
echo "-----------------------------------------------------" | |
echo "./screen -ls" | |
./screen -ls || echo $? | |
echo "-----------------------------------------------------" | |
echo "./screen --help" | |
./screen --help | |
;; | |
fedora*) | |
dnf -y update | |
dnf -y install git which | |
;; | |
alpine*) | |
apk update | |
apk add git | |
;; | |
esac | |
# Produce a binary artifact and place it in the mounted volume | |
run: | | |
uname -a | |
cp $(which git) "/artifacts/${artifact_name}" | |
echo "Produced artifact at /artifacts/${artifact_name}" | |
# Items placed in /artifacts in the container will be in | |
# ${PWD}/artifacts on the host. | |
# run: | | |
# uname -a | |
# autoconf --version | |
# ls -al "${PWD}/artifacts" | |
- name: uname | |
shell: bash | |
run: | | |
cat /etc/issue | |
uname -a | |
autoconf --version | |
make -v | |
gcc -v | |
clang -v | |
dpkg -l libpam0g-dev | |
- name: Install libpam0g-dev | |
run: sudo apt install libpam0g-dev | |
- name: autogen | |
shell: bash | |
working-directory: ${{github.workspace}}/src | |
run: ./autogen.sh | |
- name: gcc configure | |
shell: bash | |
working-directory: ${{github.workspace}}/src | |
run: cc=gcc ./configure CFLAGS="-Wall" | |
- name: gcc build | |
shell: bash | |
working-directory: ${{github.workspace}}/src | |
run: make | |
- name: test | |
shell: bash | |
working-directory: ${{github.workspace}}/src | |
run: | | |
./screen -v | |
./screen -ls || echo $? | |
make clean | |
- name: clang configure | |
shell: bash | |
working-directory: ${{github.workspace}}/src | |
run: cc=clang ./configure CFLAGS="-Wall" | |
- name: clang build | |
shell: bash | |
working-directory: ${{github.workspace}}/src | |
run: make | |
- name: test | |
shell: bash | |
working-directory: ${{github.workspace}}/src | |
run: | | |
./screen -v | |
./screen --help | |
./screen -ls || echo $? |