Skip to content

Commit

Permalink
Cut down build to identify doc build problems
Browse files Browse the repository at this point in the history
Also split out the build targets to work out which one(s) are
problematic.
  • Loading branch information
me-and committed Oct 18, 2023
1 parent ae6b1c9 commit ce35489
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 100 deletions.
50 changes: 4 additions & 46 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ jobs:
defaults:
run:
shell: bash --noprofile --norc -e -o pipefail -o igncr {0}
matrix:
build-target: [all,html,man,info,pdf]
fast-fail: false
env:
_BUILD_TARGET: ${{ matrix.build-target }}
PATH: C:\cygwin\bin
steps:
- name: Install Cygwin Git and cygport
Expand Down Expand Up @@ -56,52 +60,6 @@ jobs:
- name: Cygport compile
run: cygport git.cygport compile
timeout-minutes: 30
- name: Cygport test
run: cygport git.cygport test
timeout-minutes: 300
- name: Cygport install
run: cygport git.cygport install
timeout-minutes: 30
- name: Cygport package
run: cygport git.cygport package
timeout-minutes: 5
- name: Configure SSH
if: github.ref == 'refs/heads/main'
env:
MAINTAINER_KEY: ${{ secrets.MAINTAINER_KEY }}
run: |
umask 0077
mkdir -p ~/.ssh
echo "$MAINTAINER_KEY" >~/.ssh/id_rsa
echo 'cygwin.com,8.43.85.97 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBGqrxexIuyqmCVe33p1HuhUFzsXte5QZKb+BJlsRrvXOpUOJEW2S0kszyAiymeV7AXaYmHDKVRJpGVR+0ua0Xww=' >~/.ssh/known_hosts
timeout-minutes: 1
- name: Create release tag
if: github.ref == 'refs/heads/main'
env:
GIT_COMMITTER_NAME: ${{ github.actor }}
GIT_COMMITTER_EMAIL: ${{ github.actor }}@users.noreply.github.com
run: |
git tag -am "v${PVR}" "v${PVR}"
git push origin tag "v${PVR}"
timeout-minutes: 1
- name: Create a GitHub release
if: github.ref == 'refs/heads/main'
uses: softprops/action-gh-release@v1
with:
tag_name: v${{ env.PVR }}
files: |
git-*/dist/git/*
git-*/dist/git/*/*
target_commitish: ${{ github.ref }}
timeout-minutes: 2
- name: Mirror to Cygwin Git repositories
if: github.ref == 'refs/heads/main'
run: git push [email protected]:/git/cygwin-packages/git tag "v${PVR}"
timeout-minutes: 5
- name: Cygport upload
if: github.ref == 'refs/heads/main'
run: SSH_KEY=~/.ssh/id_rsa cygport git.cygport upload
timeout-minutes: 5
- name: Tar up build results
if: always()
run: tar -caf git-build-results.txz git-*-*.*/
Expand Down
57 changes: 3 additions & 54 deletions git.cygport
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ src_compile() {
lndirs
cd ${B}
cygconf --with-libpcre
cygmake all html man info pdf
printf '::notice::cygmake build target is %q\n' "$_BUILD_TARGET"
cygmake "$_BUILD_TARGET"
}

src_install() {
Expand All @@ -104,59 +105,7 @@ src_install() {
}

src_test() {
# Test t4018 fails if the files in the build directory are left as
# symlinks rather than being real files.
rm ${B}/t/t4018/*
cp ${S}/t/t4018/* ${B}/t/t4018
cd ${B}

# Unless GIT_SKIP_TESTS is already set, in which case trust the version
# that comes from the environment (including if it's the null string),
# always skip known failures.
if [[ ! -v GIT_SKIP_TESTS ]]; then
known_failures=()

# https://github.com/me-and/Cygwin-Git/issues/54
known_failures+=(t5562)

export GIT_SKIP_TESTS="${known_failures[*]}"
fi

# Also pull in skips set in GIT_SKIP_ADDITIONAL_TESTS. That's an
# environment variable made up for this script rather than one
# suggested by the Git build infrastructure. The idea is that setting
# GIT_SKIP_TESTS would override the previous block for skipping known
# failures, GIT_SKIP_ADDITIONAL_TESTS will be an addition to the
# previous block.
[[ -v GIT_SKIP_ADDITIONAL_TESTS ]] && export GIT_SKIP_TESTS="${GIT_SKIP_TESTS}${GIT_SKIP_TESTS:+ }${GIT_SKIP_ADDITIONAL_TESTS}"

# Create an array of tests to skip for the main run, but which
# shouldn't be listed in the GIT_SKIP_TESTS environment variable,
# because we may want to try to run them later.
main_run_skip_tests=()

# Skip t7900 from the main run as it needs a lot of disk space. If
# there's sufficient space later, we can run it then.
main_run_skip_tests+=('t7900')

# Return code. Set to zero now, it'll be set to non-zero by any test
# that fails. We want to know about all failures, but we also want to
# run later tests even if earlier ones fail.
rc=0

GIT_SKIP_TESTS="${GIT_SKIP_TESTS}${GIT_SKIP_TESTS:+ }${main_run_skip_tests[*]}" GIT_TEST_OPTS='--tee -l' DEFAULT_TEST_TARGET=prove GIT_PROVE_OPTS="--jobs $(($(nproc 2>/dev/null) + 1)) --timer" cygtest || rc=$?

# Run t7900 if there's at least 10GB free disk space. It's much more
# likely that that's the case now other tests aren't running at the
# same time.
if (( $(($(stat -f --format="%a*%S" .) / 1024 / 1024 / 1024)) > 10 )); then
( cd ${B}/t && echo t7900-*.sh && ./t7900-*.sh --tee -l; ) || rc="$?"
else
echo 'Skipping t7900 due to lack of disk space'
rc=1
fi

return "$rc"
return 1
}

# vim: set noexpandtab tabstop=8 listchars=tab\:\ \ ,trail\:-,lead\:-

0 comments on commit ce35489

Please sign in to comment.