Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/l10n.yml105
-rw-r--r--.github/workflows/main.yml10
2 files changed, 111 insertions, 4 deletions
diff --git a/.github/workflows/l10n.yml b/.github/workflows/l10n.yml
new file mode 100644
index 0000000000..27f72f0ff3
--- /dev/null
+++ b/.github/workflows/l10n.yml
@@ -0,0 +1,105 @@
+name: git-l10n
+
+on: [push, pull_request_target]
+
+jobs:
+ git-po-helper:
+ if: >-
+ endsWith(github.repository, '/git-po') ||
+ contains(github.head_ref, 'l10n') ||
+ contains(github.ref, 'l10n')
+ runs-on: ubuntu-latest
+ permissions:
+ pull-requests: write
+ steps:
+ - name: Setup base and head objects
+ id: setup-tips
+ run: |
+ if test "${{ github.event_name }}" = "pull_request_target"
+ then
+ base=${{ github.event.pull_request.base.sha }}
+ head=${{ github.event.pull_request.head.sha }}
+ else
+ base=${{ github.event.before }}
+ head=${{ github.event.after }}
+ fi
+ echo "::set-output name=base::$base"
+ echo "::set-output name=head::$head"
+ - name: Run partial clone
+ run: |
+ git -c init.defaultBranch=master init --bare .
+ git remote add \
+ --mirror=fetch \
+ origin \
+ https://github.com/${{ github.repository }}
+ # Fetch tips that may be unreachable from github.ref:
+ # - For a forced push, "$base" may be unreachable.
+ # - For a "pull_request_target" event, "$head" may be unreachable.
+ args=
+ for commit in \
+ ${{ steps.setup-tips.outputs.base }} \
+ ${{ steps.setup-tips.outputs.head }}
+ do
+ case $commit in
+ *[^0]*)
+ args="$args $commit"
+ ;;
+ *)
+ # Should not fetch ZERO-OID.
+ ;;
+ esac
+ done
+ git -c protocol.version=2 fetch \
+ --progress \
+ --no-tags \
+ --no-write-fetch-head \
+ --filter=blob:none \
+ origin \
+ ${{ github.ref }} \
+ $args
+ - uses: actions/setup-go@v2
+ with:
+ go-version: '>=1.16'
+ - name: Install git-po-helper
+ run: go install github.com/git-l10n/git-po-helper@main
+ - name: Install other dependencies
+ run: |
+ sudo apt-get update -q &&
+ sudo apt-get install -q -y gettext
+ - name: Run git-po-helper
+ id: check-commits
+ run: |
+ exit_code=0
+ git-po-helper check-commits \
+ --github-action-event="${{ github.event_name }}" -- \
+ ${{ steps.setup-tips.outputs.base }}..${{ steps.setup-tips.outputs.head }} \
+ >git-po-helper.out 2>&1 || exit_code=$?
+ if test $exit_code -ne 0 || grep -q WARNING git-po-helper.out
+ then
+ # Remove ANSI colors which are proper for console logs but not
+ # proper for PR comment.
+ echo "COMMENT_BODY<<EOF" >>$GITHUB_ENV
+ perl -pe 's/\e\[[0-9;]*m//g; s/\bEOF$//g' git-po-helper.out >>$GITHUB_ENV
+ echo "EOF" >>$GITHUB_ENV
+ fi
+ cat git-po-helper.out
+ exit $exit_code
+ - name: Create comment in pull request for report
+ uses: mshick/add-pr-comment@v1
+ if: >-
+ always() &&
+ github.event_name == 'pull_request_target' &&
+ env.COMMENT_BODY != ''
+ with:
+ repo-token: ${{ secrets.GITHUB_TOKEN }}
+ repo-token-user-login: 'github-actions[bot]'
+ message: >
+ ${{ steps.check-commits.outcome == 'failure' && 'Errors and warnings' || 'Warnings' }}
+ found by [git-po-helper](https://github.com/git-l10n/git-po-helper#readme) in workflow
+ [#${{ github.run_number }}](${{ env.GITHUB_SERVER_URL }}/${{ github.repository }}/actions/runs/${{ github.run_id }}):
+
+ ```
+
+ ${{ env.COMMENT_BODY }}
+
+ ```
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 6b35909e6c..deda12db3a 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -88,7 +88,7 @@ jobs:
env:
HOME: ${{runner.workspace}}
NO_PERL: 1
- run: ci/make-test-artifacts.sh artifacts
+ run: . /etc/profile && ci/make-test-artifacts.sh artifacts
- name: zip up tracked files
run: git archive -o artifacts/tracked.tar.gz HEAD
- name: upload tracked files and build artifacts
@@ -115,7 +115,7 @@ jobs:
- uses: git-for-windows/setup-git-for-windows-sdk@v1
- name: test
shell: bash
- run: ci/run-test-slice.sh ${{matrix.nr}} 10
+ run: . /etc/profile && ci/run-test-slice.sh ${{matrix.nr}} 10
- name: ci/print-test-failures.sh
if: failure()
shell: bash
@@ -198,8 +198,7 @@ jobs:
shell: bash
env:
NO_SVN_TESTS: 1
- GIT_TEST_SKIP_REBASE_P: 1
- run: ci/run-test-slice.sh ${{matrix.nr}} 10
+ run: . /etc/profile && ci/run-test-slice.sh ${{matrix.nr}} 10
- name: ci/print-test-failures.sh
if: failure()
shell: bash
@@ -232,6 +231,9 @@ jobs:
- jobname: linux-gcc-default
cc: gcc
pool: ubuntu-latest
+ - jobname: linux-leaks
+ cc: gcc
+ pool: ubuntu-latest
env:
CC: ${{matrix.vector.cc}}
jobname: ${{matrix.vector.jobname}}