Files
2020-01-29 12:03:28 -08:00

299 lines
7.4 KiB
YAML

name: C/C++ CI
on: [push, pull_request]
env:
TRAVIS: true
jobs:
unit_and_style:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v1
- name: build
run: scripts/build_ci.bash
- name: check style
run: make compliant && make shellcheck && make docs-coverage
- name: check install
run: sudo make install && make install-check
- name: run unit tests
run: make check
- name: run distcheck
run: make distcheck
- name: print status
if: failure()
run: cat test-suite.log
test_3rd_party1:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v1
- name: build
run: scripts/build_ci.bash
- name: Run prereq
run: test/functional/generate-cert.prereq
- name: run check
run: |
THIRD_PARTY_TOTAL="$(find test/functional/3rd-party -name *.bats | wc -l)"
THIRD_PARTY_SUBGROUP1_TOTAL=9
THIRD_PARTY_SUBGROUP2_TOTAL="$((THIRD_PARTY_TOTAL - THIRD_PARTY_SUBGROUP1_TOTAL))"
THIRD_PARTY_SUBGROUP="$(find test/functional/3rd-party -name *.bats | head -n $THIRD_PARTY_SUBGROUP1_TOTAL | tr '\n' ' ')"
env TESTS="$THIRD_PARTY_SUBGROUP" make -e -j2 check
- name: print status
if: failure()
run: cat test-suite.log
test_3rd_party2:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v1
- name: build
run: scripts/build_ci.bash
- name: Run prereq
run: test/functional/generate-cert.prereq
- name: run check
run: |
THIRD_PARTY_TOTAL="$(find test/functional/3rd-party -name *.bats | wc -l)"
THIRD_PARTY_SUBGROUP1_TOTAL=9
THIRD_PARTY_SUBGROUP2_TOTAL="$((THIRD_PARTY_TOTAL - THIRD_PARTY_SUBGROUP1_TOTAL))"
THIRD_PARTY_SUBGROUP="$(find test/functional/3rd-party -name *.bats | tail -n $THIRD_PARTY_SUBGROUP2_TOTAL | tr '\n' ' ')"
env TESTS="$THIRD_PARTY_SUBGROUP" make -e -j2 check
- name: print status
if: failure()
run: cat test-suite.log
test_multiple:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v1
- name: build
run: scripts/build_ci.bash
- name: Run prereq
run: test/functional/generate-cert.prereq
- name: run check
run: env TESTS="$(find test/functional/{autoupdate,checkupdate,hashdump,info,mirror,signature,usability,verify-legacy} -name *.bats -printf '%p ')" make -e -j2 check
- name: print status
if: failure()
run: cat test-suite.log
test_bundle_add:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v1
- name: build
run: scripts/build_ci.bash
- name: Run prereq
run: test/functional/generate-cert.prereq
- name: run check
run: env TESTS="$(find test/functional/bundleadd -name *.bats -printf '%p ')" make -e -j2 check
- name: print status
if: failure()
run: cat test-suite.log
test_bundle_info:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v1
- name: build
run: scripts/build_ci.bash
- name: Run prereq
run: test/functional/generate-cert.prereq
- name: run check
run: env TESTS="$(find test/functional/bundleinfo -name *.bats -printf '%p ')" make -e -j2 check
- name: print status
if: failure()
run: cat test-suite.log
test_bundle_list:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v1
- name: build
run: scripts/build_ci.bash
- name: Run prereq
run: test/functional/generate-cert.prereq
- name: run check
run: env TESTS="$(find test/functional/bundlelist -name *.bats -printf '%p ')" make -e -j2 check
- name: print status
if: failure()
run: cat test-suite.log
test_bundle_remove:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v1
- name: build
run: scripts/build_ci.bash
- name: Run prereq
run: test/functional/generate-cert.prereq
- name: run check
run: env TESTS="$(find test/functional/bundleremove -name *.bats -printf '%p ')" make -e -j2 check
- name: print status
if: failure()
run: cat test-suite.log
test_diagnose:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v1
- name: build
run: scripts/build_ci.bash
- name: Run prereq
run: test/functional/generate-cert.prereq
- name: run check
run: env TESTS="$(find test/functional/diagnose -name *.bats -printf '%p ')" make -e -j2 check
- name: print status
if: failure()
run: cat test-suite.log
test_os_install:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v1
- name: build
run: scripts/build_ci.bash
- name: Run prereq
run: test/functional/generate-cert.prereq
- name: run check
run: env TESTS="$(find test/functional/os-install -name *.bats -printf '%p ')" make -e -j2 check
- name: print status
if: failure()
run: cat test-suite.log
test_repair:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v1
- name: build
run: scripts/build_ci.bash
- name: Run prereq
run: test/functional/generate-cert.prereq
- name: run check
run: env TESTS="$(find test/functional/repair -name *.bats -printf '%p ')" make -e -j2 check
- name: print status
if: failure()
run: cat test-suite.log
test_search:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v1
- name: build
run: scripts/build_ci.bash
- name: Run prereq
run: test/functional/generate-cert.prereq
- name: run check
run: env TESTS="$(find test/functional/search -name *.bats -printf '%p ')" make -e -j2 check
- name: print status
if: failure()
run: cat test-suite.log
test_update1:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v1
- name: build
run: scripts/build_ci.bash
- name: Run prereq
run: test/functional/generate-cert.prereq
- name: run check
run: |
UPDATE_TOTAL="$(find test/functional/update -name *.bats | wc -l)"
UPDATE_SUBGROUP1_TOTAL=25
UPDATE_SUBGROUP2_TOTAL="$((UPDATE_TOTAL - UPDATE_SUBGROUP1_TOTAL))"
UPDATE_SUBGROUP="$(find test/functional/update -name *.bats | head -n $UPDATE_SUBGROUP1_TOTAL | tr '\n' ' ')"
env TESTS="$UPDATE_SUBGROUP" make -e -j2 check
- name: print status
if: failure()
run: cat test-suite.log
test_update2:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v1
- name: build
run: scripts/build_ci.bash
- name: Run prereq
run: test/functional/generate-cert.prereq
- name: run check
run: |
UPDATE_TOTAL="$(find test/functional/update -name *.bats | wc -l)"
UPDATE_SUBGROUP1_TOTAL=25
UPDATE_SUBGROUP2_TOTAL="$((UPDATE_TOTAL - UPDATE_SUBGROUP1_TOTAL))"
UPDATE_SUBGROUP="$(find test/functional/update -name *.bats | tail -n $UPDATE_SUBGROUP2_TOTAL | tr '\n' ' ')"
env TESTS="$UPDATE_SUBGROUP" make -e -j2 check
- name: print status
if: failure()
run: cat test-suite.log