1
0
mirror of https://github.com/libssh2/libssh2.git synced 2025-11-20 02:42:09 +03:00

ci: update actions, use shallow clones with appveyor

- update GitHub Actions to their latest versions.

- use shallow git clones in AppVeyor CI to save data over the wire.

Closes #1199
This commit is contained in:
Viktor Szakats
2023-09-30 14:58:51 +00:00
parent 8a081fd98b
commit d468a33f62
4 changed files with 17 additions and 15 deletions

View File

@@ -18,14 +18,14 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 5 timeout-minutes: 5
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- name: 'checksrc' - name: 'checksrc'
run: ./ci/checksrc.sh run: ./ci/checksrc.sh
spellcheck: spellcheck:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- name: 'install tools' - name: 'install tools'
run: pip install -U codespell run: pip install -U codespell
- name: 'spellcheck' - name: 'spellcheck'
@@ -38,7 +38,7 @@ jobs:
env: env:
CC: clang CC: clang
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- name: 'cmake' - name: 'cmake'
run: | run: |
sudo apt-get --quiet 2 --option Dpkg::Use-Pty=0 install libssl-dev sudo apt-get --quiet 2 --option Dpkg::Use-Pty=0 install libssl-dev
@@ -87,7 +87,7 @@ jobs:
env: env:
CC: ${{ matrix.compiler }} CC: ${{ matrix.compiler }}
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- name: 'install architecture' - name: 'install architecture'
if: ${{ matrix.arch != 'amd64' }} if: ${{ matrix.arch != 'amd64' }}
run: | run: |
@@ -176,7 +176,7 @@ jobs:
env: env:
TRIPLET: 'x86_64-w64-mingw32' TRIPLET: 'x86_64-w64-mingw32'
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- name: 'install packages' - name: 'install packages'
run: sudo apt-get --quiet 2 --option Dpkg::Use-Pty=0 install mingw-w64 run: sudo apt-get --quiet 2 --option Dpkg::Use-Pty=0 install mingw-w64
- name: 'autotools autoreconf' - name: 'autotools autoreconf'
@@ -216,7 +216,7 @@ jobs:
fail-fast: false fail-fast: false
steps: steps:
- run: git config --global core.autocrlf input - run: git config --global core.autocrlf input
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: cygwin/cygwin-install-action@v4 - uses: cygwin/cygwin-install-action@v4
with: with:
platform: ${{ matrix.platform }} platform: ${{ matrix.platform }}
@@ -273,7 +273,7 @@ jobs:
- { build: 'make' , sys: mingw64, env: x86_64 } - { build: 'make' , sys: mingw64, env: x86_64 }
fail-fast: false fail-fast: false
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: msys2/setup-msys2@v2 - uses: msys2/setup-msys2@v2
if: ${{ matrix.sys == 'msys' }} if: ${{ matrix.sys == 'msys' }}
with: with:
@@ -382,7 +382,7 @@ jobs:
- { arch: x86 , plat: windows, crypto: WinCNG , log: 'OFF', shared: 'ON' , zlib: 'OFF', unity: 'OFF' } - { arch: x86 , plat: windows, crypto: WinCNG , log: 'OFF', shared: 'ON' , zlib: 'OFF', unity: 'OFF' }
fail-fast: false fail-fast: false
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- name: 'cmake configure' - name: 'cmake configure'
shell: bash shell: bash
run: | run: |
@@ -453,7 +453,7 @@ jobs:
steps: steps:
- name: 'install packages' - name: 'install packages'
run: brew install automake ${{ matrix.crypto.install }} run: brew install automake ${{ matrix.crypto.install }}
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- name: 'autotools autoreconf' - name: 'autotools autoreconf'
if: ${{ matrix.build == 'autotools' }} if: ${{ matrix.build == 'autotools' }}
run: autoreconf -fi run: autoreconf -fi

View File

@@ -34,13 +34,13 @@ jobs:
build-and-push: build-and-push:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: docker/login-action@v2 - uses: docker/login-action@v3
with: with:
registry: ghcr.io registry: ghcr.io
username: ${{ github.repository_owner }} username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }} password: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- shell: bash - shell: bash
id: hash id: hash
@@ -51,7 +51,7 @@ jobs:
run: docker manifest inspect ghcr.io/${{ github.repository_owner }}/ci_tests_openssh_server:${{ steps.hash.outputs.hash }} run: docker manifest inspect ghcr.io/${{ github.repository_owner }}/ci_tests_openssh_server:${{ steps.hash.outputs.hash }}
continue-on-error: true continue-on-error: true
- uses: docker/metadata-action@v4 - uses: docker/metadata-action@v5
id: meta id: meta
with: with:
images: ghcr.io/${{ github.repository_owner }}/ci_tests_openssh_server images: ghcr.io/${{ github.repository_owner }}/ci_tests_openssh_server
@@ -59,7 +59,7 @@ jobs:
type=raw,value=${{ steps.hash.outputs.hash }} type=raw,value=${{ steps.hash.outputs.hash }}
if: ${{ steps.poll.outcome == 'failure' }} if: ${{ steps.poll.outcome == 'failure' }}
- uses: docker/build-push-action@v3 - uses: docker/build-push-action@v5
with: with:
context: ./tests/openssh_server context: ./tests/openssh_server
push: true push: true

View File

@@ -24,6 +24,6 @@ jobs:
check: check:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- name: REUSE Compliance Check - name: REUSE Compliance Check
uses: fsfe/reuse-action@v1 uses: fsfe/reuse-action@v2

View File

@@ -226,6 +226,8 @@ skip_commits:
files: files:
- '.github/**/*' - '.github/**/*'
clone_depth: 10
# Limit branches to avoid testing feature branches twice (as branch and as pull request) # Limit branches to avoid testing feature branches twice (as branch and as pull request)
branches: branches:
only: only: