Skip to content

Merge Git 2.51 and Boost CI coverage #12

Merge Git 2.51 and Boost CI coverage

Merge Git 2.51 and Boost CI coverage #12

name: AddRepo tests
on:
push:
pull_request:
workflow_dispatch:
permissions:
contents: read
jobs:
unit-tests:
name: Unit tests (CMake ${{ matrix.cmake-version }}, Git ${{ matrix.git-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
cmake-version: ['~3.25.0', '3.31.6', 'latest']
git-version: ['system', '2.51.0']
steps:
- uses: actions/checkout@v6
- uses: lukka/get-cmake@latest
with:
cmakeVersion: ${{ matrix.cmake-version }}
- name: Install Git ${{ matrix.git-version }}
if: matrix.git-version != 'system'
env:
GIT_VERSION: ${{ matrix.git-version }}
run: |
sudo apt-get update
sudo apt-get install --yes libcurl4-openssl-dev libexpat1-dev libssl-dev zlib1g-dev
curl --fail --silent --show-error --location \
"https://www.kernel.org/pub/software/scm/git/git-${GIT_VERSION}.tar.xz" \
--output /tmp/git.tar.xz
tar --extract --file=/tmp/git.tar.xz --directory=/tmp
make --directory="/tmp/git-${GIT_VERSION}" \
prefix="/opt/git-${GIT_VERSION}" \
NO_GETTEXT=YesPlease NO_TCLTK=YesPlease \
--jobs=2 all
sudo make --directory="/tmp/git-${GIT_VERSION}" \
prefix="/opt/git-${GIT_VERSION}" \
NO_GETTEXT=YesPlease NO_TCLTK=YesPlease \
install
echo "/opt/git-${GIT_VERSION}/bin" >> "$GITHUB_PATH"
- name: Verify Git version
env:
EXPECTED_GIT_VERSION: ${{ matrix.git-version }}
run: |
git --version
if [ "$EXPECTED_GIT_VERSION" != system ]; then
test "$(git --version)" = "git version $EXPECTED_GIT_VERSION"
fi
- name: Configure Git identity
run: |
git config --global user.name "AddRepo CI"
git config --global user.email "addrepo-ci@example.invalid"
- name: Configure fixture repository SSH key
env:
ADDREPO_TEST_SSH_KEY: ${{ secrets.ADDREPO_TEST_SSH_KEY }}
run: |
install -d -m 700 ~/.ssh
printf '%s\n' "$ADDREPO_TEST_SSH_KEY" > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519
ssh-keyscan github.com >> ~/.ssh/known_hosts
- name: Run hermetic AddRepo tests
run: python3 tests/AddRepo/run_tests.py
- name: Run GitHub transport test
run: python3 tests/AddRepo/github_transport.py
- name: Clone and verify Boost repository
run: python3 tests/AddRepo/boost_repository.py