From 3bd600762a70faccc7ec1c2dacb999cba6c6ef5e Mon Sep 17 00:00:00 2001 From: Chris Mc Date: Mon, 24 Jan 2022 23:27:50 -0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=84=20Add=20a=20lint=20job=20to=20norm?= =?UTF-8?q?alize=20line=20endings=20(#200)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add job to normalize line endings * add missing checkout * continue to comment * Update action.yml * normalize line endings --- .github/actions/badge/publish/action.yml | 36 +-- .../process-linting-results/action.yml | 5 + .github/workflows/lint.yml | 9 + .github/workflows/ssl.yml | 214 +++++++++--------- 4 files changed, 139 insertions(+), 125 deletions(-) diff --git a/.github/actions/badge/publish/action.yml b/.github/actions/badge/publish/action.yml index 0fcd3d6..5d1c257 100644 --- a/.github/actions/badge/publish/action.yml +++ b/.github/actions/badge/publish/action.yml @@ -1,18 +1,18 @@ -name: Publish a Badges -description: Publishes all badges -inputs: - github_token: - description: The token to use to publish the changes - required: false - default: ${{ github.token }} -runs: - using: composite - steps: - - uses: peaceiris/actions-gh-pages@v3 - with: - github_token: ${{ inputs.github_token }} - publish_branch: badges - publish_dir: ./badges - keep_files: true - user_name: "github-actions[bot]" - user_email: "github-actions[bot]@users.noreply.github.com" +name: Publish a Badges +description: Publishes all badges +inputs: + github_token: + description: The token to use to publish the changes + required: false + default: ${{ github.token }} +runs: + using: composite + steps: + - uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ inputs.github_token }} + publish_branch: badges + publish_dir: ./badges + keep_files: true + user_name: "github-actions[bot]" + user_email: "github-actions[bot]@users.noreply.github.com" diff --git a/.github/actions/process-linting-results/action.yml b/.github/actions/process-linting-results/action.yml index c31f348..1a3c50d 100644 --- a/.github/actions/process-linting-results/action.yml +++ b/.github/actions/process-linting-results/action.yml @@ -10,7 +10,12 @@ runs: - run: git add --update shell: bash - id: stage + #continue-on-error: true uses: dtinth/patch-generator-action@v1 + + # Unfortunately the previous action reports a failure so nothing else can run + # partially a limitation on composite actions since `continue-on-error` is not + # yet supported - if: steps.stage.outputs.result == 'dirty' uses: actions-ecosystem/action-create-comment@v1 with: diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 5383e72..85fee6b 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -112,3 +112,12 @@ jobs: - uses: ./.github/actions/process-linting-results with: linter_name: render-tests + + line-ending: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v2 + - run: git add --renormalize . + - uses: ./.github/actions/process-linting-results + with: + linter_name: line-ending diff --git a/.github/workflows/ssl.yml b/.github/workflows/ssl.yml index 170e0fb..e79899e 100644 --- a/.github/workflows/ssl.yml +++ b/.github/workflows/ssl.yml @@ -1,107 +1,107 @@ -name: SSL Compatibility CI - -on: - push: - branches: [master] - pull_request: - branches: [master] - -jobs: - openssl: - runs-on: ubuntu-latest - strategy: - matrix: - openssl: - - { tag: "openssl-3.0.0", name: "3.0.0" } - - { tag: "OpenSSL_1_1_1l", name: "1.1.1l" } - - { tag: "OpenSSL_1_1_0i", name: "1.1.0i" } - - { tag: "OpenSSL_1_0_2u", name: "1.0.2u" } - - { tag: "OpenSSL_1_0_1u", name: "1.0.1u" } - name: OpenSSL ${{ matrix.openssl.name }} - steps: - - uses: actions/checkout@v2 - - uses: lukka/get-cmake@latest - - uses: ./.github/actions/install/gtest - - uses: ./.github/actions/install/openssl - with: - version: ${{ matrix.openssl.tag }} - - - name: configure - run: cmake . -DJWT_BUILD_TESTS=ON -DOPENSSL_ROOT_DIR=/tmp - - run: make - - name: test - run: ./tests/jwt-cpp-test - - - if: github.event_name == 'push' && always() - uses: ./.github/actions/badge - with: - category: openssl - label: ${{ matrix.openssl.name }} - - openssl-no-deprecated: - runs-on: ubuntu-latest - name: OpenSSL 3.0 No Deprecated - steps: - - uses: actions/checkout@v2 - - uses: lukka/get-cmake@latest - - uses: ./.github/actions/install/gtest - - uses: ./.github/actions/install/openssl - with: - version: "openssl-3.0.0" - - - name: configure - run: cmake . -DJWT_BUILD_TESTS=ON -DOPENSSL_ROOT_DIR=/tmp -DCMAKE_CXX_FLAGS="-DOPENSSL_NO_DEPRECATED_3_0=1" -DCMAKE_C_FLAGS="-DOPENSSL_NO_DEPRECATED_3_0=1" - - run: make - - libressl: - runs-on: ubuntu-latest - strategy: - matrix: - libressl: ["3.4.0", "3.3.4", "3.2.6"] - name: LibreSSL ${{ matrix.libressl }} - steps: - - uses: actions/checkout@v2 - - uses: lukka/get-cmake@latest - - uses: ./.github/actions/install/gtest - - uses: ./.github/actions/install/libressl - with: - version: ${{ matrix.libressl }} - - - name: configure - run: cmake . -DJWT_BUILD_TESTS=ON -DJWT_SSL_LIBRARY:STRING=LibreSSL - - run: make - - name: test - run: ./tests/jwt-cpp-test - - - if: github.event_name == 'push' && always() - uses: ./.github/actions/badge - with: - category: libressl - label: ${{ matrix.libressl }} - - wolfssl: - runs-on: ubuntu-latest - strategy: - matrix: - wolfssl: - - { ref: "v5.0.0-stable", name: "5.0.0" } - name: wolfSSL ${{ matrix.wolfssl.name }} - steps: - - uses: actions/checkout@v2 - - uses: lukka/get-cmake@latest - - uses: ./.github/actions/install/gtest - - uses: ./.github/actions/install/wolfssl - with: - version: ${{ matrix.wolfssl.ref }} - - - name: configure - run: cmake . -DJWT_BUILD_TESTS=ON -DJWT_SSL_LIBRARY:STRING=wolfSSL - - run: make - - name: test - run: ./tests/jwt-cpp-test - - - if: github.event_name == 'push' && always() - uses: ./.github/actions/badge - with: - category: wolfssl - label: ${{ matrix.wolfssl.name }} +name: SSL Compatibility CI + +on: + push: + branches: [master] + pull_request: + branches: [master] + +jobs: + openssl: + runs-on: ubuntu-latest + strategy: + matrix: + openssl: + - { tag: "openssl-3.0.0", name: "3.0.0" } + - { tag: "OpenSSL_1_1_1l", name: "1.1.1l" } + - { tag: "OpenSSL_1_1_0i", name: "1.1.0i" } + - { tag: "OpenSSL_1_0_2u", name: "1.0.2u" } + - { tag: "OpenSSL_1_0_1u", name: "1.0.1u" } + name: OpenSSL ${{ matrix.openssl.name }} + steps: + - uses: actions/checkout@v2 + - uses: lukka/get-cmake@latest + - uses: ./.github/actions/install/gtest + - uses: ./.github/actions/install/openssl + with: + version: ${{ matrix.openssl.tag }} + + - name: configure + run: cmake . -DJWT_BUILD_TESTS=ON -DOPENSSL_ROOT_DIR=/tmp + - run: make + - name: test + run: ./tests/jwt-cpp-test + + - if: github.event_name == 'push' && always() + uses: ./.github/actions/badge + with: + category: openssl + label: ${{ matrix.openssl.name }} + + openssl-no-deprecated: + runs-on: ubuntu-latest + name: OpenSSL 3.0 No Deprecated + steps: + - uses: actions/checkout@v2 + - uses: lukka/get-cmake@latest + - uses: ./.github/actions/install/gtest + - uses: ./.github/actions/install/openssl + with: + version: "openssl-3.0.0" + + - name: configure + run: cmake . -DJWT_BUILD_TESTS=ON -DOPENSSL_ROOT_DIR=/tmp -DCMAKE_CXX_FLAGS="-DOPENSSL_NO_DEPRECATED_3_0=1" -DCMAKE_C_FLAGS="-DOPENSSL_NO_DEPRECATED_3_0=1" + - run: make + + libressl: + runs-on: ubuntu-latest + strategy: + matrix: + libressl: ["3.4.0", "3.3.4", "3.2.6"] + name: LibreSSL ${{ matrix.libressl }} + steps: + - uses: actions/checkout@v2 + - uses: lukka/get-cmake@latest + - uses: ./.github/actions/install/gtest + - uses: ./.github/actions/install/libressl + with: + version: ${{ matrix.libressl }} + + - name: configure + run: cmake . -DJWT_BUILD_TESTS=ON -DJWT_SSL_LIBRARY:STRING=LibreSSL + - run: make + - name: test + run: ./tests/jwt-cpp-test + + - if: github.event_name == 'push' && always() + uses: ./.github/actions/badge + with: + category: libressl + label: ${{ matrix.libressl }} + + wolfssl: + runs-on: ubuntu-latest + strategy: + matrix: + wolfssl: + - { ref: "v5.0.0-stable", name: "5.0.0" } + name: wolfSSL ${{ matrix.wolfssl.name }} + steps: + - uses: actions/checkout@v2 + - uses: lukka/get-cmake@latest + - uses: ./.github/actions/install/gtest + - uses: ./.github/actions/install/wolfssl + with: + version: ${{ matrix.wolfssl.ref }} + + - name: configure + run: cmake . -DJWT_BUILD_TESTS=ON -DJWT_SSL_LIBRARY:STRING=wolfSSL + - run: make + - name: test + run: ./tests/jwt-cpp-test + + - if: github.event_name == 'push' && always() + uses: ./.github/actions/badge + with: + category: wolfssl + label: ${{ matrix.wolfssl.name }}