2022-12-25 03:58:00 -05:00
|
|
|
name: Main
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [master]
|
|
|
|
pull_request:
|
|
|
|
branches: [master]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
lint:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: dependencies
|
|
|
|
run: sudo apt-get --yes install cppcheck
|
|
|
|
- name: autogen
|
|
|
|
run: ./autogen.sh
|
|
|
|
- name: configure
|
|
|
|
run: ./configure --enable-checks-cppcheck
|
|
|
|
- name: check
|
|
|
|
run: make check
|
|
|
|
|
|
|
|
test:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
assert: ['--disable-assert', '--enable-assert']
|
|
|
|
cc: ['gcc', 'clang', 'tcc']
|
|
|
|
opt: ['', '-O0', '-O3']
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: dependencies
|
|
|
|
run: sudo apt-get --yes install clang tcc
|
|
|
|
- name: autogen
|
|
|
|
run: ./autogen.sh
|
|
|
|
- name: configure
|
2022-12-25 04:12:53 -05:00
|
|
|
run: ./configure ${{matrix.assert}} --enable-checks CC='${{matrix.cc}}' CFLAGS='${{matrix.opt}}'
|
2022-12-25 03:58:00 -05:00
|
|
|
- name: make
|
|
|
|
run: make
|
|
|
|
- name: check
|
|
|
|
run: make check || (./make/test-suite-log && false)
|
|
|
|
- name: install
|
|
|
|
run: sudo make install
|
|
|
|
|
|
|
|
cross:
|
|
|
|
runs-on: ubuntu-22.04 # jammy, because it's in ".github/sources.list"
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
cross:
|
|
|
|
- arch: 'aarch64'
|
|
|
|
apt_arch: 'arm64'
|
|
|
|
apt_pkgs: 'crossbuild-essential-arm64'
|
|
|
|
cprefix: 'aarch64-linux-gnu-'
|
|
|
|
- arch: 'i386'
|
|
|
|
apt_arch: 'i386'
|
|
|
|
apt_pkgs: 'crossbuild-essential-i386'
|
|
|
|
cprefix: 'i686-linux-gnu-'
|
|
|
|
- arch: 'riscv64'
|
|
|
|
apt_arch: 'riscv64'
|
|
|
|
apt_pkgs: 'crossbuild-essential-riscv64'
|
|
|
|
cprefix: 'riscv64-linux-gnu-'
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: apt sources
|
|
|
|
run: sudo cp .github/sources.list /etc/apt/sources.list
|
|
|
|
- name: apt upgrade
|
|
|
|
run: sudo apt-get --yes update && (sudo apt-get --yes upgrade || sudo apt-get --yes -f install)
|
|
|
|
- name: dependencies
|
|
|
|
run: sudo apt-get --yes install binfmt-support qemu qemu-user-static ${{matrix.cross.apt_pkgs}}
|
|
|
|
- name: dpkg arch
|
|
|
|
run: sudo dpkg --add-architecture ${{matrix.cross.apt_arch}}
|
|
|
|
- name: apt update
|
|
|
|
run: sudo apt-get --yes update
|
|
|
|
- name: cross dependencies
|
|
|
|
run: sudo apt-get --yes install libc6:${{matrix.cross.apt_arch}}
|
|
|
|
- name: autogen
|
|
|
|
run: ./autogen.sh
|
|
|
|
- name: configure
|
2022-12-25 04:12:53 -05:00
|
|
|
run: ./configure --host='${{matrix.cross.arch}}-unknown-elf' --enable-checks CC='${{matrix.cross.cprefix}}gcc'
|
2022-12-25 03:58:00 -05:00
|
|
|
- name: make
|
|
|
|
run: make
|
|
|
|
- name: check
|
|
|
|
run: make check || (./make/test-suite-log && false)
|
|
|
|
- name: install
|
|
|
|
run: sudo make install
|
|
|
|
|
|
|
|
cond:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
packages:
|
|
|
|
- without: 'all'
|
|
|
|
- without: 'io'
|
|
|
|
- without: 'ntoa'
|
2022-12-25 04:29:45 -05:00
|
|
|
dependencies: '--without-units'
|
2022-12-25 03:58:00 -05:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: autogen
|
|
|
|
run: ./autogen.sh
|
|
|
|
- name: configure
|
2022-12-25 04:12:53 -05:00
|
|
|
run: ./configure --enable-checks --without-${{matrix.packages.without}} ${{matrix.packages.dependencies}}
|
2022-12-25 03:58:00 -05:00
|
|
|
- name: make
|
|
|
|
run: make
|
|
|
|
- name: check
|
|
|
|
run: make check || (./make/test-suite-log && false)
|
|
|
|
- name: install
|
|
|
|
run: sudo make install
|
|
|
|
|
|
|
|
freestanding:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
assert: ['--disable-assert', '--enable-assert']
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: apt update
|
|
|
|
run: sudo apt-get --yes update
|
|
|
|
- name: dependencies
|
|
|
|
run: sudo apt-get --yes install crossbuild-essential-i386
|
|
|
|
- name: autogen
|
|
|
|
run: ./autogen.sh
|
|
|
|
- name: configure
|
|
|
|
run: ./configure --host='i386-elf' ${{matrix.assert}} --enable-freestanding --with-libc CC="$(which i686-linux-gnu-gcc)"
|
|
|
|
- name: make
|
|
|
|
run: make
|
|
|
|
|
|
|
|
dist:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: autogen
|
|
|
|
run: ./autogen.sh
|
|
|
|
- name: configure dist
|
|
|
|
run: ./configure
|
|
|
|
- name: dist
|
|
|
|
run: make dist
|
|
|
|
- name: extract
|
|
|
|
run: tar -xzf "libkernaux-$(cat VERSION).tar.gz"
|
|
|
|
- name: configure
|
2022-12-25 04:12:53 -05:00
|
|
|
run: cd "libkernaux-$(cat VERSION)" && ./configure --enable-checks
|
2022-12-25 03:58:00 -05:00
|
|
|
- name: make
|
|
|
|
run: cd "libkernaux-$(cat VERSION)" && make
|
|
|
|
- name: check
|
|
|
|
run: cd "libkernaux-$(cat VERSION)" && make check || (./make/test-suite-log && false)
|
|
|
|
- name: install
|
|
|
|
run: cd "libkernaux-$(cat VERSION)" && sudo make install
|