...

Text file src/github.com/containerd/continuity/.github/workflows/ci.yml

Documentation: github.com/containerd/continuity/.github/workflows

     1name: Continuity
     2
     3on:
     4  push:
     5    branches: [ main ]
     6  pull_request:
     7    branches: [ main ]
     8
     9env:
    10  GO_VERSION: 1.20.x
    11
    12jobs:
    13
    14  #
    15  # Project checks
    16  #
    17  project:
    18    name: Project Checks
    19    runs-on: ubuntu-22.04
    20    timeout-minutes: 5
    21
    22    steps:
    23      - uses: actions/checkout@v3
    24        with:
    25          path: src/github.com/containerd/continuity
    26          fetch-depth: 100
    27
    28      - name: Set up Go
    29        uses: actions/setup-go@v3
    30        with:
    31          go-version: ${{ env.GO_VERSION }}
    32
    33      - uses: containerd/project-checks@v1.1.0
    34        with:
    35          working-directory: src/github.com/containerd/continuity
    36
    37  tests:
    38    name: CI Tests
    39    runs-on: ${{ matrix.os }}
    40    timeout-minutes: 10
    41    needs: [project]
    42
    43    strategy:
    44      matrix:
    45        os: [ubuntu-22.04, macos-12, windows-2019, windows-2022]
    46
    47    steps:
    48    - name: Set up Go
    49      uses: actions/setup-go@v3
    50      with:
    51        go-version: ${{ env.GO_VERSION }}
    52
    53    - name: Git line endings
    54      shell: bash
    55      run: |
    56        git config --global core.autocrlf false
    57        git config --global core.eol lf
    58
    59    - name: Check out code
    60      uses: actions/checkout@v3
    61      with:
    62        path: src/github.com/containerd/continuity
    63        fetch-depth: 25
    64
    65    - name: Dependencies
    66      run: go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.51.2
    67
    68    - name: Lint
    69      shell: bash
    70      run: make lint
    71      working-directory: src/github.com/containerd/continuity
    72
    73    - name: Build
    74      shell: bash
    75      run: make build binaries
    76      working-directory: src/github.com/containerd/continuity
    77
    78    - name: Tests
    79      run: |
    80        make test
    81      working-directory: src/github.com/containerd/continuity
    82
    83    - name: Root Tests
    84      if: ${{ !startsWith(matrix.os, 'windows') }}
    85      run: |
    86        make root-test
    87      working-directory: src/github.com/containerd/continuity
    88  cross:
    89    name: Cross-compile
    90    runs-on: ubuntu-22.04
    91    timeout-minutes: 10
    92    needs: [project]
    93
    94    strategy:
    95      matrix:
    96        goos: [freebsd, openbsd, netbsd, dragonfly, darwin, solaris]
    97
    98    steps:
    99    - name: Set up Go
   100      uses: actions/setup-go@v3
   101      with:
   102        go-version: ${{ env.GO_VERSION }}
   103
   104    - name: Setup Go binary path
   105      shell: bash
   106      run: |
   107        echo "${{ github.workspace }}/bin" >> $GITHUB_PATH
   108
   109    - name: Check out code
   110      uses: actions/checkout@v3
   111      with:
   112        path: src/github.com/containerd/continuity
   113
   114    - name: Cross-compile ${{matrix.goos}}
   115      shell: bash
   116      run: |
   117          GOOS=${{matrix.goos}} make build binaries
   118      working-directory: src/github.com/containerd/continuity

View as plain text