This is an automated email from the ASF dual-hosted git repository. kocolosk pushed a commit to branch update-toolchain in repository https://gitbox.apache.org/repos/asf/couchdb-khash.git
commit 1134d86bccac91b1cec908bab8c4ba79db36abb2 Author: Adam Kocoloski <[email protected]> AuthorDate: Fri Nov 26 19:11:09 2021 +0000 Add branch protection and GHA CI --- .asf.yaml | 22 +++++++++++++++ .github/workflows/ci.yml | 70 ++++++++++++++++++++++++++++++++++++++++++++++++ .gitmodules | 9 +++++++ 3 files changed, 101 insertions(+) diff --git a/.asf.yaml b/.asf.yaml new file mode 100644 index 0000000..ddc80a2 --- /dev/null +++ b/.asf.yaml @@ -0,0 +1,22 @@ +github: + description: "Wrapper for Kazlib's hash data structure" + labels: + - couchdb + - erlang + - kazlib + - nif + features: + issues: true + enabled_merge_buttons: + squash: true + rebase: true + merge: true + protected_branches: + main: + required_status_checks: + strict: true + + notifications: + commits: [email protected] + issues: [email protected] + pullrequests: [email protected] \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..cd3b777 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,70 @@ +name: CI + +on: + push: + branches: [ main ] + pull_request: + +permissions: + contents: read + +jobs: + + matrix_build: + strategy: + matrix: + otp-version: ['22', '23', '24'] + # erlef/setup-beam action does not support macos yet + os: [ubuntu-latest, windows-latest] + rebar3-version: ['3.17'] + include: + - otp-version: '21' + os: ubuntu-latest + rebar3-version: '3.15.2' + - otp-version: '21' + os: windows-latest + rebar3-version: '3.15.2' + - otp-version: '20' + os: ubuntu-latest + rebar3-version: '3.15.2' + + runs-on: ${{ matrix.os }} + env: + # Define to something other than empty string to enable verbose rebar3 logging + DEBUG: '' + steps: + - name: Check out repository code + uses: actions/checkout@v2 + with: + persist-credentials: false + submodules: recursive + - name: Setup Erlang + id: setup-beam + uses: ./.github/actions/setup-beam + with: + otp-version: ${{ matrix.otp-version }} + rebar3-version: ${{ matrix.rebar3-version }} + - name: Setup MSVC toolchain + if: ${{ matrix.os == 'windows-latest' }} + uses: ./.github/actions/msvc-dev-cmd + - name: Check coding style with erlfmt + if: ${{ matrix.os == 'ubuntu-latest' }} + run: rebar3 fmt --check + continue-on-error: true + - name: Compile + run: rebar3 compile + - name: EUnit tests + run: rebar3 eunit + - name: Restore dialyzer PLT from cache + uses: actions/cache@v2 + with: + path: ~/.cache/rebar3/rebar3_*_plt + key: ${{ runner.os }}-${{ steps.setup-beam.outputs.otp-version }} + - name: Run dialyzer analysis + run: rebar3 as test dialyzer + - name: Setup tmate session on job failure + uses: ./.github/actions/tmate + if: ${{ failure() }} + with: + limit-access-to-actor: true + diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..d8e3f24 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,9 @@ +[submodule ".github/actions/tmate"] + path = .github/actions/tmate + url = https://github.com/mxschmitt/action-tmate +[submodule ".github/actions/msvc-dev-cmd"] + path = .github/actions/msvc-dev-cmd + url = https://github.com/ilammy/msvc-dev-cmd +[submodule ".github/actions/setup-beam"] + path = .github/actions/setup-beam + url = https://github.com/erlef/setup-beam
