+ linux:
+ runs-on: ubuntu-22.04
+ timeout-minutes: 30
+ strategy:
+ fail-fast: false
+ matrix:
+ os:
+ - alpine
+ - alpine:edge
+ - centos:7 # aka RHEL 7
+ - almalinux:8 # aka RHEL 8
+ - almalinux:9 # aka RHEL 9
+ - fedora
+ - debian:buster
+ - debian:bullseye
+ - debian:testing
+ - ubuntu # current LTS
+ - ubuntu:rolling # latest
+ container:
+ image: ${{ matrix.os }}
+ options: --privileged
+ env:
+ CI: 1
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v1
+
+ - name: Install deps
+ run: sh .ci/deps.sh
+
+ - name: Assign name for test results artifact
+ run: echo ARTIFACT="$(echo '${{ matrix.os }}' | sed 's|[:/]|_|g')" >>"$GITHUB_ENV"
+
+ - name: Create a non-privileged user
+ run: sh .ci/test/prepare.sh
+
+ - name: Run tests with OpenSSL 3
+ run: sudo -u build CI=1 sh .ci/test/run.sh openssl3
+
+ - name: Run tests with default settings
+ run: sudo -u build CI=1 sh .ci/test/run.sh default
+ if: always()
+
+ - name: Run tests without legacy protocol
+ run: sudo -u build CI=1 sh .ci/test/run.sh nolegacy
+ if: always()
+
+ - name: Run tests with libgcrypt
+ run: sudo -u build CI=1 sh .ci/test/run.sh gcrypt
+ if: always()
+
+ - name: Upload test results
+ uses: actions/upload-artifact@v2
+ with:
+ name: tests_${{ env.ARTIFACT }}
+ path: /tmp/logs/tests.*.tar.gz
+ if: always()
+
+ - name: Build package
+ run: sh .ci/package/build.sh
+ if: github.ref == 'refs/heads/1.1' || startsWith(github.ref, 'refs/tags/release-')
+ continue-on-error: true
+
+ - name: Upload package
+ uses: actions/upload-artifact@v2
+ with:
+ name: pkg-${{ env.ARTIFACT }}
+ path: |
+ *.deb
+ ~/rpmbuild/RPMS/*/*.rpm
+ continue-on-error: true
+
+ pkg-publish:
+ if: always() && (github.ref == 'refs/heads/1.1' || startsWith(github.ref, 'refs/tags/release-'))
+ runs-on: ubuntu-22.04
+ continue-on-error: true
+ needs:
+ - linux
+ - mingw
+
+ steps:
+ - name: Create artifact directory
+ run: mkdir -p /tmp/artifacts
+
+ - name: Download packages
+ uses: actions/download-artifact@v2
+ with:
+ path: /tmp/artifacts
+
+ - name: Publish packages (dev)
+ uses: marvinpinto/action-automatic-releases@latest
+ with:
+ repo_token: ${{ secrets.GITHUB_TOKEN }}
+ automatic_release_tag: latest
+ title: Development release
+ prerelease: true
+ files: /tmp/artifacts/**/*.(deb|rpm|exe)
+ if: startsWith(github.ref, 'refs/heads/')
+
+ - name: Publish packages (release)
+ uses: softprops/action-gh-release@v1
+ with:
+ files: |
+ /tmp/artifacts/**/*.deb
+ /tmp/artifacts/**/*.rpm
+ /tmp/artifacts/**/*.exe
+ if: startsWith(github.ref, 'refs/tags/')
+
+ macos:
+ runs-on: macos-12
+ timeout-minutes: 20