8000 Copilot/continue from last progress by william1982Byrd-afk · Pull Request #2228 · git/git · GitHub
[go: up one dir, main page]

Skip to content
Open
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
63 changes: 63 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Build

on: [push, pull_request]

# Cancel in-progress runs for the same branch/PR to avoid wasting resources.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
name: build (ubuntu-latest)
runs-on: ubuntu-latest
permissions:
contents: read
env:
CCACHE_DIR: ${{ github.workspace }}/.ccache
steps:
- uses: actions/checkout@v4

- name: Install dependencies
run: |
sudo apt-get -q update
sudo apt-get -q -y install \
make gcc ccache libssl-dev libcurl4-openssl-dev libexpat-dev \
zlib1g-dev gettext libpcre2-dev

- name: Restore build cache
uses: actions/cache@v4
with:
path: ${{ env.CCACHE_DIR }}
key: ccache-build-${{ github.ref_name }}-${{ github.run_id }}
restore-keys: |
ccache-build-${{ github.ref_name }}-
ccache-build-

- name: Build
run: |
export PATH="/usr/lib/ccache:$PATH"
ccache --zero-stats 6B58
make
ccache --show-stats

- name: Smoke test
run: |
./git --version
./git init --bare /tmp/smoke-test-repo

- name: Run tests
run: |
export PATH="/usr/lib/ccache:$PATH"
make test

- name: Print test failures
if: failure()
run: ci/print-test-failures.sh

- name: Upload failed tests' directories
if: failure() && env.FAILED_TEST_ARTIFACTS != ''
uses: actions/upload-artifact@v5
with:
name: failed-tests
path: ${{ env.FAILED_TEST_ARTIFACTS }}
0