8000 ci: improvements to prepare for Cygwin support by ethomson · Pull Request #6696 · libgit2/libgit2 · GitHub
[go: up one dir, main page]

Skip to content

ci: improvements to prepare for Cygwin support #6696

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Dec 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
* text=auto
ci/**/*.sh text eol=lf
script/**/*.sh text eol=lf
tests/resources/** linguist-vendored
9 changes: 7 additions & 2 deletions .github/actions/run-build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,19 @@ description: Run a build step in a container or directly on the Actions runner
inputs:
command:
description: Command to run
required: true
type: string
required: true
container:
description: Optional container to run in
type: string
container-version:
description: Version of the container to run
type: string
shell:
description: Shell to use
type: string
required: true
default: 'bash'

runs:
using: 'composite'
Expand Down Expand Up @@ -42,4 +47,4 @@ runs:
else
${{ inputs.command }}
fi
shell: bash
shell: ${{ inputs.shell != '' && inputs.shell || 'bash' }}
33 changes: 18 additions & 15 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,42 +29,43 @@ jobs:
strategy:
matrix:
platform:
# All builds: core platforms
- name: "Linux (Xenial, GCC, OpenSSL, libssh2)"
id: xenial-gcc-openssl
os: ubuntu-latest
container:
name: xenial
env:
CC: gcc
CMAKE_GENERATOR: Ninja
CMAKE_OPTIONS: -DUSE_HTTPS=OpenSSL -DREGEX_BACKEND=builtin -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=valgrind -DUSE_GSSAPI=ON -DUSE_SSH=libssh2 -DDEBUG_STRICT_ALLOC=ON -DDEBUG_STRICT_OPEN=ON
os: ubuntu-latest
- name: Linux (Xenial, GCC, mbedTLS, OpenSSH)
id: xenial-gcc-mbedtls
os: ubuntu-latest
container:
name: xenial
env:
CC: gcc
CMAKE_GENERATOR: Ninja
CMAKE_OPTIONS: -DUSE_HTTPS=mbedTLS -DUSE_SHA1=HTTPS -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=valgrind -DUSE_GSSAPI=ON -DUSE_SSH=exec
os: ubuntu-latest
- name: "Linux (Xenial, Clang, OpenSSL, OpenSSH)"
id: xenial-clang-openssl
os: ubuntu-latest
container:
name: xenial
env:
CC: clang
CMAKE_GENERATOR: Ninja
CMAKE_OPTIONS: -DUSE_HTTPS=OpenSSL -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=valgrind -DUSE_GSSAPI=ON -DUSE_SSH=exec
os: ubuntu-latest
- name: "Linux (Xenial, Clang, mbedTLS, libssh2)"
id: xenial-clang-mbedtls
os: ubuntu-latest
container:
name: xenial
env:
CC: clang
CMAKE_OPTIONS: -DUSE_HTTPS=mbedTLS -DUSE_SHA1=HTTPS -DREGEX_BACKEND=pcre -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=valgrind -DUSE_GSSAPI=ON -DUSE_SSH=libssh2
CMAKE_GENERATOR: Ninja
os: ubuntu-latest
- name: "macOS"
id: macos
os: macos-12
Expand Down Expand Up @@ -125,9 +126,9 @@ jobs:
SKIP_SSH_TESTS: true
SKIP_NEGOTIATE_TESTS: true

# Sanitizers
# All builds: sanitizers
- name: "Sanitizer (Memory)"
id: memorysanitizer
id: sanitizer-memory
container:
name: focal
env:
Expand All @@ -141,7 +142,8 @@ jobs:
UBSAN_OPTIONS: print_stacktrace=1
os: ubuntu-latest
- name: "Sanitizer (UndefinedBehavior)"
id: ubsanitizer
id: sanitizer-ub
os: ubuntu-latest
container:
name: focal
env:
Expand All @@ -153,9 +155,9 @@ jobs:
SKIP_NEGOTIATE_TESTS: true
ASAN_SYMBOLIZER_PATH: /usr/bin/llvm-symbolizer-10
UBSAN_OPTIONS: print_stacktrace=1
os: ubuntu-latest
- name: "Sanitizer (Thread)"
id: threadsanitizer
id: sanitizer-thread
os: ubuntu-latest
container:
name: focal
env:
Expand All @@ -168,29 +170,28 @@ jobs:
ASAN_SYMBOLIZER_PATH: /usr/bin/llvm-symbolizer-10
UBSAN_OPTIONS: print_stacktrace=1
TSAN_OPTIONS: suppressions=/home/libgit2/source/script/thread-sanitizer.supp second_deadlock_stack=1
os: ubuntu-latest

# Experimental: SHA256 support
# All builds: experimental SHA256 support
- name: "Linux (SHA256, Xenial, Clang, OpenSSL)"
id: xenial-clang-openssl
os: ubuntu-latest
container:
name: xenial
env:
CC: clang
CMAKE_GENERATOR: Ninja
CMAKE_OPTIONS: -DUSE_HTTPS=OpenSSL -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=valgrind -DUSE_GSSAPI=ON -DUSE_SSH=ON -DEXPERIMENTAL_SHA256=ON
os: ubuntu-latest
- name: "macOS (SHA256)"
id: macos
os: macos-12
setup-script: osx
env:
CC: clang
CMAKE_OPTIONS: -DREGEX_BACKEND=regcomp_l -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=leaks -DUSE_GSSAPI=ON -DEXPERIMENTAL_SHA256=ON
CMAKE_GENERATOR: Ninja
PKG_CONFIG_PATH: /usr/local/opt/openssl/lib/pkgconfig
SKIP_SSH_TESTS: true
SKIP_NEGOTIATE_TESTS: true
setup-script: osx
- name: "Windows (SHA256, amd64, Visual Studio)"
id: windows-amd64-vs
os: windows-2019
Expand Down Expand Up @@ -238,15 +239,17 @@ jobs:
- name: Build
uses: ./source/.github/actions/run-build
with:
command: cd build && ../source/ci/build.sh
command: cd ${BUILD_WORKSPACE:-.}/build && ../source/ci/build.sh
container: ${{ matrix.platform.container.name }}
container-version: ${{ env.docker-registry-container-sha }}
shell: ${{ matrix.platform.shell }}
- name: Test
uses: ./source/.github/actions/run-build
with:
command: cd build && ../source/ci/test.sh
command: cd ${BUILD_WORKSPACE:-.}/build && ../source/ci/test.sh
container: ${{ matrix.platform.container.name }}
container-version: ${{ env.docker-registry-container-sha }}
shell: ${{ matrix.platform.shell }}
- name: Upload test results
uses: actions/upload-artifact@v3
if: success() || failure()
Expand Down
Loading
0