<commit_before>name: Build
on:
  pull_request:
    branches: [ master ]
  push:
    # ci-sandbox is a branch dedicated to testing post-submit code.
    branches: [ master, artifacts-pr ]
    tags:
      - v*
  schedule:
    # run on Mondays at 8AM
    - cron:  '0 8 * * 1'
env:
  # required by Makefile
  UNIX_SHELL_ON_WINDOWS: true

  # PUBLISH_BINARIES=true publishes the binaries to github
  PUBLISH_BINARIES: ${{ secrets.PUBLISH_BINARIES }}

  # where to publish releases for non-tagged commits
  NON_TAG_RELEASE_REPO: ${{ secrets.NON_TAG_RELEASE_REPO }}

  # encrypt various secrets stored as files
  CREDENTIAL_ENCRYPTION_KEY: ${{ secrets.CREDENTIAL_ENCRYPTION_KEY }}
  CREDENTIAL_ENCRYPTION_IV: ${{ secrets.CREDENTIAL_ENCRYPTION_IV }}

  # Apple ID and app-specific password for notarizaton
  APPLEID: ${{ secrets.APPLEID }}
  APPLEIDPASS: ${{ secrets.APPLEIDPASS }}
  KOPIA_UI_NOTARIZE: ${{ secrets.KOPIA_UI_NOTARIZE }}

  # tool to install Windows signing certificate
  WINDOWS_SIGNING_TOOLS_URL: ${{ secrets.WINDOWS_SIGNING_TOOLS_URL }}
  WINDOWS_SIGN_USER: ${{ secrets.WINDOWS_SIGN_USER }}
  WINDOWS_SIGN_AUTH: ${{ secrets.WINDOWS_SIGN_AUTH }}
  WINDOWS_CERT_SHA1: ${{ secrets.WINDOWS_CERT_SHA1 }}
  WINDOWS_SIGN_TOOL: ${{ secrets.WINDOWS_SIGN_TOOL }}

  # macOS signing certificate (base64-encoded), used by Electron Builder
  CSC_LINK: ${{ secrets.CSC_LINK }}
  CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
  MACOS_SIGNING_IDENTITY: ${{ secrets.MACOS_SIGNING_IDENTITY }}

  # used to publish docker images
  DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
  DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}

  # used in Azure tests
  KOPIA_AZURE_TEST_CONTAINER: ${{ secrets.KOPIA_AZURE_TEST_CONTAINER }}
  KOPIA_AZURE_TEST_STORAGE_ACCOUNT: ${{ secrets.KOPIA_AZURE_TEST_STORAGE_ACCOUNT }}
  KOPIA_AZURE_TEST_STORAGE_KEY: ${{ secrets.KOPIA_AZURE_TEST_STORAGE_KEY }}

  # used in B2 tests
  KOPIA_B2_TEST_BUCKET: ${{ secrets.KOPIA_B2_TEST_BUCKET }}
  KOPIA_B2_TEST_KEY: ${{ secrets.KOPIA_B2_TEST_KEY }}
  KOPIA_B2_TEST_KEY_ID: ${{ secrets.KOPIA_B2_TEST_KEY_ID }}

  # used in GCS tests
  KOPIA_GCS_CREDENTIALS_FILE: ${{ secrets.KOPIA_GCS_CREDENTIALS_FILE }}
  KOPIA_GCS_TEST_BUCKET: ${{ secrets.KOPIA_GCS_TEST_BUCKET }}

  # used in S3 tests
  KOPIA_S3_TEST_ENDPOINT: ${{ secrets.KOPIA_S3_TEST_ENDPOINT }}
  KOPIA_S3_TEST_ACCESS_KEY_ID: ${{ secrets.KOPIA_S3_TEST_ACCESS_KEY_ID }}
  KOPIA_S3_TEST_SECRET_ACCESS_KEY: ${{ secrets.KOPIA_S3_TEST_SECRET_ACCESS_KEY }}
  KOPIA_S3_TEST_BUCKET: ${{ secrets.KOPIA_S3_TEST_BUCKET }}
  KOPIA_S3_TEST_REGION: ${{ secrets.KOPIA_S3_TEST_REGION }}
  KOPIA_S3_TEST_STS_ACCESS_KEY_ID: ${{ secrets.KOPIA_S3_TEST_STS_ACCESS_KEY_ID }}
  KOPIA_S3_TEST_STS_SECRET_ACCESS_KEY: ${{ secrets.KOPIA_S3_TEST_STS_SECRET_ACCESS_KEY }}
  KOPIA_S3_TEST_SESSION_TOKEN: ${{ secrets.KOPIA_S3_TEST_SESSION_TOKEN }}

  # used in SFTP tests
  KOPIA_SFTP_TEST_HOST: ${{ secrets.KOPIA_SFTP_TEST_HOST }}
  KOPIA_SFTP_TEST_PORT: ${{ secrets.KOPIA_SFTP_TEST_PORT }}
  KOPIA_SFTP_TEST_USER: ${{ secrets.KOPIA_SFTP_TEST_USER }}
  KOPIA_SFTP_TEST_PATH: ${{ secrets.KOPIA_SFTP_TEST_PATH }}
  KOPIA_SFTP_KEYFILE: ${{ secrets.KOPIA_SFTP_KEYFILE }}
  KOPIA_SFTP_KNOWN_HOSTS_FILE: ${{ secrets.KOPIA_SFTP_KNOWN_HOSTS_FILE }}

  # used in WebDAV tests
  KOPIA_WEBDAV_TEST_URL: ${{ secrets.KOPIA_WEBDAV_TEST_URL }}
  KOPIA_WEBDAV_TEST_USERNAME: ${{ secrets.KOPIA_WEBDAV_TEST_USERNAME }}
  KOPIA_WEBDAV_TEST_PASSWORD: ${{ secrets.KOPIA_WEBDAV_TEST_PASSWORD }}

  # Code Coverage token
  CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
jobs:
  build:
    strategy:
      fail-fast: false
      matrix:
        os: [windows-latest, ubuntu-latest, macos-latest]
        include:
          - os: [self-hosted, ARM64]
          - os: [self-hosted, ARMHF]
    name: Make
    runs-on: ${{ matrix.os }}
    continue-on-error: ${{ contains(matrix.os, 'self-hosted') }}
    steps:
    - name: Set up Go.
      uses: actions/setup-go@v2
      with:
        go-version: ^1.16
      id: go
      if: ${{ !contains(matrix.os, 'ARMHF') }}
    - name: Install GoLang for ARMHF
      run: "echo /usr/local/go/bin >> $GITHUB_PATH; mkdir -p /usr/local/go && curl -s -L https://golang.org/dl/go1.16.linux-armv6l.tar.gz | tar -C /usr/local -xz"
      if: ${{ contains(matrix.os, 'ARMHF') }}
    - name: Install Windows-specific packages
      run: "choco install --no-progress -y make unzip curl"
      if: ${{ contains(matrix.os, 'windows') }}
    - name: Install macOS-specific packages
      run: "sudo xcode-select -r"
      if: ${{ contains(matrix.os, 'macos') }}
    - name: Set up QEMU
      uses: docker/setup-qemu-action@v1
      if: ${{ contains(matrix.os, 'ubuntu') }}
    - name: Set up Docker Buildx
      uses: docker/setup-buildx-action@v1
      if: ${{ contains(matrix.os, 'ubuntu') }}
    - name: Check out code into the Go module directory
      uses: actions/checkout@v2
      with:
        fetch-depth: 0
    - name: Setup
      run: make -j4 ci-setup
    - name: Build 
      run: make ci-build
    - name: Tests
      run: make ci-tests
    - name: Integration Tests
      run: make -j2 ci-integration-tests
    - name: Publish
      run: make ci-publish
    - name: Upload Kopia Artifacts
      uses: actions/upload-artifact@v2
      with:
        name: kopia
        path: |
          dist/*.zip
          dist/*.tar.gz
          dist/*.rpm
          dist/*.deb<commit_msg>ci: store changelog along with artifacts<commit_after>name: Build
on:
  pull_request:
    branches: [ master ]
  push:
    # ci-sandbox is a branch dedicated to testing post-submit code.
    branches: [ master, artifacts-pr ]
    tags:
      - v*
  schedule:
    # run on Mondays at 8AM
    - cron:  '0 8 * * 1'
env:
  # required by Makefile
  UNIX_SHELL_ON_WINDOWS: true

  # PUBLISH_BINARIES=true publishes the binaries to github
  PUBLISH_BINARIES: ${{ secrets.PUBLISH_BINARIES }}

  # where to publish releases for non-tagged commits
  NON_TAG_RELEASE_REPO: ${{ secrets.NON_TAG_RELEASE_REPO }}

  # encrypt various secrets stored as files
  CREDENTIAL_ENCRYPTION_KEY: ${{ secrets.CREDENTIAL_ENCRYPTION_KEY }}
  CREDENTIAL_ENCRYPTION_IV: ${{ secrets.CREDENTIAL_ENCRYPTION_IV }}

  # Apple ID and app-specific password for notarizaton
  APPLEID: ${{ secrets.APPLEID }}
  APPLEIDPASS: ${{ secrets.APPLEIDPASS }}
  KOPIA_UI_NOTARIZE: ${{ secrets.KOPIA_UI_NOTARIZE }}

  # tool to install Windows signing certificate
  WINDOWS_SIGNING_TOOLS_URL: ${{ secrets.WINDOWS_SIGNING_TOOLS_URL }}
  WINDOWS_SIGN_USER: ${{ secrets.WINDOWS_SIGN_USER }}
  WINDOWS_SIGN_AUTH: ${{ secrets.WINDOWS_SIGN_AUTH }}
  WINDOWS_CERT_SHA1: ${{ secrets.WINDOWS_CERT_SHA1 }}
  WINDOWS_SIGN_TOOL: ${{ secrets.WINDOWS_SIGN_TOOL }}

  # macOS signing certificate (base64-encoded), used by Electron Builder
  CSC_LINK: ${{ secrets.CSC_LINK }}
  CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
  MACOS_SIGNING_IDENTITY: ${{ secrets.MACOS_SIGNING_IDENTITY }}

  # used to publish docker images
  DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
  DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}

  # used in Azure tests
  KOPIA_AZURE_TEST_CONTAINER: ${{ secrets.KOPIA_AZURE_TEST_CONTAINER }}
  KOPIA_AZURE_TEST_STORAGE_ACCOUNT: ${{ secrets.KOPIA_AZURE_TEST_STORAGE_ACCOUNT }}
  KOPIA_AZURE_TEST_STORAGE_KEY: ${{ secrets.KOPIA_AZURE_TEST_STORAGE_KEY }}

  # used in B2 tests
  KOPIA_B2_TEST_BUCKET: ${{ secrets.KOPIA_B2_TEST_BUCKET }}
  KOPIA_B2_TEST_KEY: ${{ secrets.KOPIA_B2_TEST_KEY }}
  KOPIA_B2_TEST_KEY_ID: ${{ secrets.KOPIA_B2_TEST_KEY_ID }}

  # used in GCS tests
  KOPIA_GCS_CREDENTIALS_FILE: ${{ secrets.KOPIA_GCS_CREDENTIALS_FILE }}
  KOPIA_GCS_TEST_BUCKET: ${{ secrets.KOPIA_GCS_TEST_BUCKET }}

  # used in S3 tests
  KOPIA_S3_TEST_ENDPOINT: ${{ secrets.KOPIA_S3_TEST_ENDPOINT }}
  KOPIA_S3_TEST_ACCESS_KEY_ID: ${{ secrets.KOPIA_S3_TEST_ACCESS_KEY_ID }}
  KOPIA_S3_TEST_SECRET_ACCESS_KEY: ${{ secrets.KOPIA_S3_TEST_SECRET_ACCESS_KEY }}
  KOPIA_S3_TEST_BUCKET: ${{ secrets.KOPIA_S3_TEST_BUCKET }}
  KOPIA_S3_TEST_REGION: ${{ secrets.KOPIA_S3_TEST_REGION }}
  KOPIA_S3_TEST_STS_ACCESS_KEY_ID: ${{ secrets.KOPIA_S3_TEST_STS_ACCESS_KEY_ID }}
  KOPIA_S3_TEST_STS_SECRET_ACCESS_KEY: ${{ secrets.KOPIA_S3_TEST_STS_SECRET_ACCESS_KEY }}
  KOPIA_S3_TEST_SESSION_TOKEN: ${{ secrets.KOPIA_S3_TEST_SESSION_TOKEN }}

  # used in SFTP tests
  KOPIA_SFTP_TEST_HOST: ${{ secrets.KOPIA_SFTP_TEST_HOST }}
  KOPIA_SFTP_TEST_PORT: ${{ secrets.KOPIA_SFTP_TEST_PORT }}
  KOPIA_SFTP_TEST_USER: ${{ secrets.KOPIA_SFTP_TEST_USER }}
  KOPIA_SFTP_TEST_PATH: ${{ secrets.KOPIA_SFTP_TEST_PATH }}
  KOPIA_SFTP_KEYFILE: ${{ secrets.KOPIA_SFTP_KEYFILE }}
  KOPIA_SFTP_KNOWN_HOSTS_FILE: ${{ secrets.KOPIA_SFTP_KNOWN_HOSTS_FILE }}

  # used in WebDAV tests
  KOPIA_WEBDAV_TEST_URL: ${{ secrets.KOPIA_WEBDAV_TEST_URL }}
  KOPIA_WEBDAV_TEST_USERNAME: ${{ secrets.KOPIA_WEBDAV_TEST_USERNAME }}
  KOPIA_WEBDAV_TEST_PASSWORD: ${{ secrets.KO<PASSWORD>_WE<PASSWORD>_TEST_PASSWORD }}

  # Code Coverage token
  CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
jobs:
  build:
    strategy:
      fail-fast: false
      matrix:
        os: [windows-latest, ubuntu-latest, macos-latest]
        include:
          - os: [self-hosted, ARM64]
          - os: [self-hosted, ARMHF]
    name: Make
    runs-on: ${{ matrix.os }}
    continue-on-error: ${{ contains(matrix.os, 'self-hosted') }}
    steps:
    - name: Set up Go.
      uses: actions/setup-go@v2
      with:
        go-version: ^1.16
      id: go
      if: ${{ !contains(matrix.os, 'ARMHF') }}
    - name: Install GoLang for ARMHF
      run: "echo /usr/local/go/bin >> $GITHUB_PATH; mkdir -p /usr/local/go && curl -s -L https://golang.org/dl/go1.16.linux-armv6l.tar.gz | tar -C /usr/local -xz"
      if: ${{ contains(matrix.os, 'ARMHF') }}
    - name: Install Windows-specific packages
      run: "choco install --no-progress -y make unzip curl"
      if: ${{ contains(matrix.os, 'windows') }}
    - name: Install macOS-specific packages
      run: "sudo xcode-select -r"
      if: ${{ contains(matrix.os, 'macos') }}
    - name: Set up QEMU
      uses: docker/setup-qemu-action@v1
      if: ${{ contains(matrix.os, 'ubuntu') }}
    - name: Set up Docker Buildx
      uses: docker/setup-buildx-action@v1
      if: ${{ contains(matrix.os, 'ubuntu') }}
    - name: Check out code into the Go module directory
      uses: actions/checkout@v2
      with:
        fetch-depth: 0
    - name: Setup
      run: make -j4 ci-setup
    - name: Build 
      run: make ci-build
    - name: Tests
      run: make ci-tests
    - name: Integration Tests
      run: make -j2 ci-integration-tests
    - name: Publish
      run: make ci-publish
    - name: Upload Kopia Artifacts
      uses: actions/upload-artifact@v2
      with:
        name: kopia
        path: |
          dist/*.md
          dist/*.zip
          dist/*.tar.gz
          dist/*.rpm
          dist/*.deb
{'fraction_non_alphanumeric': 0.11447562776957164, 'fraction_numerical': 0.009047267355982274, 'mean_word_length': 3.655350236355823, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2235274', 'n_tokens_mistral': 4398, 'n_tokens_neox': 4169, 'n_words': 721}