mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v4...v5) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
191 lines
5.8 KiB
YAML
191 lines
5.8 KiB
YAML
name: build
|
|
on:
|
|
- push
|
|
- pull_request
|
|
|
|
jobs:
|
|
gcc:
|
|
name: GCC
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
with:
|
|
submodules: true
|
|
- run: source .github/ubuntu_deps.sh
|
|
- run: source .github/build.sh
|
|
- uses: codecov/codecov-action@v5
|
|
with:
|
|
name: ${{ github.job }}
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: codecov debug results ${{ github.job }}
|
|
path: "/tmp/codecov.*.gz"
|
|
|
|
tarball:
|
|
name: Tarball
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
with:
|
|
submodules: true
|
|
- run: source .github/ubuntu_deps.sh
|
|
- run: |
|
|
date=$(date +%Y-%m-%d)
|
|
./make-tarball.sh --nightly znc-git-$date /tmp/znc-git-$date.tar.gz
|
|
tar xvf /tmp/znc-git-$date.tar.gz
|
|
cd znc-git-$date
|
|
export CFGFLAGS="--with-gtest=$GITHUB_WORKSPACE/third_party/googletest/googletest --with-gmock=$GITHUB_WORKSPACE/third_party/googletest/googlemock --disable-swig"
|
|
source $GITHUB_WORKSPACE/.github/build.sh
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: znc-tarball
|
|
path: /tmp/znc-git*.tar.gz
|
|
if-no-files-found: error
|
|
- uses: codecov/codecov-action@v5
|
|
with:
|
|
name: ${{ github.job }}
|
|
|
|
# can be removed when asan below is fixed
|
|
clang:
|
|
name: Clang
|
|
runs-on: ubuntu-24.04
|
|
env:
|
|
CXX: clang++
|
|
CC: clang
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
with:
|
|
submodules: true
|
|
- run: source .github/ubuntu_deps.sh
|
|
- run: source .github/build.sh
|
|
- uses: codecov/codecov-action@v5
|
|
with:
|
|
name: ${{ github.job }}
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: codecov debug results ${{ github.job }}
|
|
path: "/tmp/codecov.*.gz"
|
|
|
|
|
|
#clang_asan:
|
|
#name: Clang ASAN
|
|
#runs-on: ubuntu-24.04
|
|
#env:
|
|
#CXX: clang++
|
|
#CC: clang
|
|
#CXXFLAGS: "-fsanitize=address -O1 -fno-omit-frame-pointer -fno-optimize-sibling-calls -fPIE"
|
|
#LDFLAGS: "-fsanitize=address -pie"
|
|
#steps:
|
|
#- uses: actions/checkout@v5
|
|
#with:
|
|
#submodules: true
|
|
#- run: source .github/ubuntu_deps.sh
|
|
#- run: source .github/build.sh
|
|
#- uses: codecov/codecov-action@v5
|
|
|
|
#clang_tsan:
|
|
#name: Clang TSAN
|
|
#runs-on: ubuntu-24.04
|
|
#env:
|
|
#CXX: clang++
|
|
#CC: clang
|
|
#CXXFLAGS: "-fsanitize=thread -O1 -fPIE"
|
|
#LDFLAGS: "-fsanitize=thread"
|
|
#steps:
|
|
#- uses: actions/checkout@v5
|
|
#with:
|
|
#submodules: true
|
|
#- run: source .github/ubuntu_deps.sh
|
|
#- run: source .github/build.sh
|
|
#- uses: codecov/codecov-action@v5
|
|
|
|
# TODO: enable
|
|
#CXXFLAGS: "-fsanitize=memory -O1 -fno-omit-frame-pointer -fno-optimize-sibling-calls -fsanitize-memory-track-origins"
|
|
#LDFLAGS: "-fsanitize=memory"
|
|
|
|
#CXXFLAGS: "-fsanitize=undefined -O1 -fPIE -fno-sanitize-recover"
|
|
#LDFLAGS: "-fsanitize=undefined -pie -fno-sanitize-recover"
|
|
|
|
macos:
|
|
name: macOS
|
|
runs-on: macos-latest
|
|
env:
|
|
# This doesn't make big difference, since it's the same compiler, but we also use this variable to select lcov vs llvm-cov
|
|
CXX: clang++
|
|
CC: clang
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
with:
|
|
submodules: true
|
|
- run: |
|
|
brew update
|
|
brew install icu4c qt6 gettext pkg-config cpanminus boost argon2 swig
|
|
- run: source .github/build.sh
|
|
env:
|
|
# https://github.com/znc/znc/issues/1937
|
|
GTEST_FILTER: "-*Modpython*:LanguagesTests/AllLanguages.ServerDependentCapInModule/1"
|
|
- uses: codecov/codecov-action@v5
|
|
|
|
docker:
|
|
name: Docker push
|
|
runs-on: ubuntu-latest
|
|
needs:
|
|
- gcc
|
|
- tarball
|
|
- clang
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
with:
|
|
submodules: true
|
|
- id: tagger
|
|
run: |
|
|
git fetch --unshallow
|
|
echo "::set-output name=describe::$(git describe)"
|
|
if [[ "$GITHUB_REF" == refs/heads/master ]]; then
|
|
echo "::set-output name=latest::type=raw,latest"
|
|
fi
|
|
- uses: docker/metadata-action@v5
|
|
id: meta
|
|
with:
|
|
images: zncbouncer/znc-git
|
|
tags: |
|
|
type=ref,event=branch
|
|
type=ref,event=branch,suffix=-${{steps.tagger.outputs.describe}}
|
|
${{steps.tagger.outputs.latest}}
|
|
- run: echo "${GITHUB_REF#refs/heads/}-${{steps.tagger.outputs.describe}}" > .nightly
|
|
- run: cat .nightly
|
|
- uses: docker/login-action@v3
|
|
if: ${{ github.repository == 'znc/znc' && github.event_name == 'push' }}
|
|
with:
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
- uses: docker/build-push-action@v6
|
|
with:
|
|
context: .
|
|
push: ${{ github.repository == 'znc/znc' && github.event_name == 'push' }}
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
labels: ${{ steps.meta.outputs.labels }}
|
|
build-args: |
|
|
VERSION_EXTRA=+docker-git-
|
|
|
|
docs:
|
|
name: Docs push
|
|
runs-on: ubuntu-latest
|
|
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
with:
|
|
submodules: true
|
|
- run: sudo apt-get update
|
|
- run: sudo apt-get install -y doxygen graphviz python3-yaml
|
|
- run: echo "$KEY" > ~/znc-github-key
|
|
env:
|
|
KEY: ${{ secrets.SSH_GITHUB_KEY_FOR_CI_BOT }}
|
|
- run: chmod 0600 ~/znc-github-key
|
|
- run: mkdir -p ~/.ssh
|
|
- run: cp .ci/ssh-config ~/.ssh/config
|
|
# It's not travis anymore, but oh well. TODO: fix
|
|
- run: git config --global user.email "travis-ci@znc.in"
|
|
- run: git config --global user.name "znc-travis"
|
|
- run: .ci/generate-docs.sh
|