fanquake bdb343e180 ci: use newer actions/x versions for master jobs
Now that the jobs are running again, a number of deprecation warnings
have surfaced
https://github.com/libevent/libevent/actions/runs/4876367881:
```bash
Node.js 12 actions are deprecated. Please update the following actions to use Node.js 16: actions/checkout@v2.0.0.
```

Looks like the most straightforward thing todo here is just use the
newer version of the checkout action.

Also move to the v1 tag for the coveralls job, rather than a pinned,
much older version (the latest release is 1.2.5, https://github.com/coverallsapp/github-action/releases).

Same again for actions/cache.
2023-05-04 21:21:40 +02:00

170 lines
4.7 KiB
YAML

---
name: upstream
on:
push:
branches:
- master
permissions: read-all
jobs:
coverage-job:
permissions:
checks: write # for coverallsapp/github-action to create new checks
contents: read # for actions/checkout to fetch code
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Cache
uses: actions/cache@v3
with:
path: build
key: ${{ matrix.os }}-coverage-v2
- name: Install Depends
run: sudo apt install zlib1g-dev libssl-dev build-essential lcov libmbedtls-dev
- name: Build
shell: bash
run: |
export JOBS=20
mkdir -p build
cd build
cmake .. -DEVENT__COVERAGE=ON -DCMAKE_BUILD_TYPE=Debug
make -j $JOBS
- name: Test
shell: bash
run: |
export CTEST_PARALLEL_LEVEL=$JOBS
export CTEST_OUTPUT_ON_FAILURE=1
cd build
make verify_coverage
- name: Coveralls GitHub Action
uses: coverallsapp/github-action@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ./build/coverage.info.cleaned
- uses: actions/upload-artifact@v1
if: failure()
with:
name: coverage-build
path: build
abi-job:
permissions:
contents: write # for Git to git push
runs-on: ubuntu-20.04
## TODO: use docker image, but for now this is not possible without hacks
## due to even public registry require some authentication:
## - https://github.community/t5/GitHub-Actions/docker-pull-from-public-GitHub-Package-Registry-fail-with-quot/td-p/32782/page/5
#container: docker.pkg.github.com/azat/docker-images/lvc-debian
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: Install Dependencies
run:
sudo apt install
abi-tracker
abi-monitor
abi-dumper
abi-compliance-checker
pkgdiff
vtable-dumper
- name: Generate
shell: bash
run: |
./extra/abi-check/abi_check.sh
env:
ABI_CHECK_ROOT: /tmp/le-abi-root
- name: Deploy
env:
LIBEVENT_DEPLOY_ABI_PRI: ${{ secrets.LIBEVENT_DEPLOY_ABI_PRI }}
COMMIT_ID: ${{ github.sha }}
run: |
[[ -n $LIBEVENT_DEPLOY_ABI_PRI ]] || exit 0
mkdir -p ~/.ssh
echo "$LIBEVENT_DEPLOY_ABI_PRI" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan github.com >> ~/.ssh/known_hosts
short_commit_id="${COMMIT_ID:0:7}"
owner_name="${{ github.event.repository.owner.name }}"
cd /tmp/le-abi-root/work/abi-check
git init
git config --local user.name "Libevent Github Robot"
git config --local user.email "robot@libevent.org"
git add -f .
git commit -m "Update ABI/API backward compatibility report (libevent/libevent@$short_commit_id)"
git push -f git@github.com:$owner_name/abi master
# XXX: requires container-id for docker
- uses: actions/upload-artifact@v1
if: failure()
with:
name: build
path: /tmp/le-abi-root
- uses: actions/upload-artifact@v1
with:
name: build
path: /tmp/le-abi-root/work/abi-check
doxygen-job:
permissions:
contents: write # for Git to git push
runs-on: ubuntu-20.04
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: Install Depends
run: |
sudo apt install doxygen libmbedtls-dev
- name: Generate Doxygen
shell: bash
run: |
mkdir build
cd build
cmake -DEVENT__DOXYGEN=ON ..
make doxygen
- name: Deploy Documentation
env:
LIBEVENT_DEPLOY_PRI: ${{ secrets.LIBEVENT_DEPLOY_PRI }}
COMMIT_ID: ${{ github.sha }}
run: |
[[ -n $LIBEVENT_DEPLOY_PRI ]] || exit 0
mkdir -p ~/.ssh
echo "$LIBEVENT_DEPLOY_PRI" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan github.com >> ~/.ssh/known_hosts
short_commit_id="${COMMIT_ID:0:7}"
owner_name="${{ github.event.repository.owner.name }}"
cd ./build/doxygen/html
git init
git config --local user.name "Libevent Github Robot"
git config --local user.email "robot@libevent.org"
git add -f .
git commit -m "Update documentation (libevent/libevent@$short_commit_id)"
git push -f git@github.com:$owner_name/doc master
- uses: actions/upload-artifact@v1
if: failure()
with:
name: doxygen-build
path: build