/
niceSOFT
/
libxcrypt
Обзор
Документация
Войти
/
niceSOFT
/
libxcrypt
Код
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
develop
.github/workflows/codecov.yml
120 строк
4 KB
Björn Esser
Drop outdated comments.
16 янв 2025, 16:38
Не верифицирован
16 янв 2025, 16:38
0cada50
Код
Авторство
О чём код?
name: "Code coverage" on: pull_request: push: jobs: skip_duplicates: continue-on-error: true runs-on: ubuntu-24.04 outputs: should_skip: ${{ steps.skip_check.outputs.should_skip }} steps: - id: skip_check uses: fkirc/skip-duplicate-actions@v5 with: concurrent_skipping: 'same_content_newer' skip_after_successful_duplicate: 'true' paths_ignore: '["doc/**", "**/*.md", ".gitignore", "libxcrypt.spec.rpkg", ".packit.yaml", "rpkg.macros", "AUTHORS", "ChangeLog", "COPYING.LIB", "LICENSING", "NEWS", "README", "THANKS", "TODO"]' do_not_skip: '["workflow_dispatch", "schedule"]' O0-Buildflags: needs: skip_duplicates if: ${{ needs.skip_duplicates.outputs.should_skip != 'true' }} runs-on: ubuntu-24.04 strategy: fail-fast: false matrix: compiler: [gcc, clang] config_opts: - "--enable-obsolete-api --enable-hashes=all --enable-failure-tokens" - "--enable-obsolete-api --enable-obsolete-api-enosys --enable-hashes=all --enable-failure-tokens" - "--disable-obsolete-api --enable-hashes=all --enable-failure-tokens" # --enable-hashes=strong can only be used with --disable-obsolete-api - "--disable-obsolete-api --enable-failure-tokens --enable-hashes=strong" # failure tokens only affect the generic code so there's no point # testing with all of the hashes; use descrypt only, to get coverage # of the --enable-obsolete-api code in this mode, and to get coverage # of an "only one hash enabled" configuration. - "--enable-obsolete-api --disable-failure-tokens --enable-hashes=descrypt" env: ac_cv_func_arc4random_buf: "no" CC: ${{ matrix.compiler }} CONFIG_OPTS: ${{ matrix.config_opts }} CFLAGS: "-O0 -g -fprofile-arcs -ftest-coverage" CXXFLAGS: "-O0 -g -fprofile-arcs -ftest-coverage" LDFLAGS: "--coverage" VERBOSE: 1 steps: - name: Checkout uses: actions/checkout@v4 - name: Install packages run: | packages="lcov libltdl-dev" if [ "$CC" = clang ]; then # need 'llvm' for llvm-cov, as well as clang packages="$packages clang llvm" fi sudo apt-get install $packages - name: Versions of build tools id: build-tools run: ./build-aux/ci/ci-log-dependency-versions - name: Get nprocs run: echo "NPROCS=$((`nproc --all 2>/dev/null || sysctl -n hw.ncpu` * 2))" | tee $GITHUB_ENV - name: Cache bootstrap id: cache uses: actions/cache@v4 with: path: | INSTALL Makefile.in aclocal.m4 config.h.in configure autom4te.cache/** build-aux/m4/libtool.m4 build-aux/m4/ltoptions.m4 build-aux/m4/ltsugar.m4 build-aux/m4/ltversion.m4 build-aux/m4/lt~obsolete.m4 build-aux/m4-autogen/** key: autoreconf-${{ steps.build-tools.outputs.autotools-ver }}-${{ hashFiles('autogen.sh', 'configure.ac', 'Makefile.am', 'build-aux/m4/*.m4', 'build-aux/m4-autogen/**') }} - name: Bootstrap if: steps.cache.outputs.cache-hit != 'true' run: ./autogen.sh - name: Configure run: ./configure $CONFIG_OPTS - name: Build run: | make -j${{ env.NPROCS }} all make -j${{ env.NPROCS }} test-programs - name: Test run: make -j${{ env.NPROCS }} check - name: Summarize coverage data run: ./build-aux/ci/summarize-coverage coverage.info - name: Upload coverage data to Codecov uses: codecov/codecov-action@v5 with: fail_ci_if_error: true files: coverage.info token: ${{ secrets.CODECOV_TOKEN }} verbose: true - name: Detailed error logs if: failure() run: ./build-aux/ci/ci-log-logfiles