Skip to content

Move parson to subdirectory of src #48

Move parson to subdirectory of src

Move parson to subdirectory of src #48

Workflow file for this run

name: CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
compiler: [gcc, clang]
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt update
sudo apt install -y openssl gcc clang make libarchive-dev libcurl4-openssl-dev libbz2-dev libpsl-dev automake autoconf libtool m4 libidn2-dev libbrotli-dev libnghttp2-dev libldap-dev
- name: Make
run: make DEBUG=yes CC=${{ matrix.compiler }}
- name: Package test
run: ./compak -p tests/libhello
- name: Verify archive
run: test -e libhello.tar.xz
- name: Verify contents
run: |
tar -tf libhello.tar.xz > contents.txt
grep '^compak.json$' contents.txt
grep '^hello.c$' contents.txt
grep '^hello.h$' contents.txt
grep '^Makefile$' contents.txt
- name: Install package
run: sudo ./compak -i libhello.tar.xz
- name: Check binaries
run: |
test -x /usr/local/bin/hello
test -e /usr/local/lib/libhello.a
test -e /usr/local/include/hello.h
- name: Run binary
run: |
output=$(/usr/local/bin/hello)
test "$output" = "Hello, world!"
- name: Check package registry
run: |
test -f /var/lib/compak/libhello/compak.json
- name: Check package listing
run: |
./compak -l > packages.txt
grep '^libhello:' packages.txt
- name: Check package viewing
run: ./compak --raw -v libhello | cmp - /var/lib/compak/libhello/compak.json
- name: Remove package
run: sudo ./compak -r libhello
- name: Verify removal
run: |
test ! -e /usr/local/bin/hello
test ! -e /var/lib/compak/hello