github.com/mutagen-io/mutagen@v0.18.0-rc1/.github/workflows/ci.yml (about) 1 # Set the workflow name. 2 name: CI 3 4 # Execute the workflow on pushes and pull requests. 5 on: [push, pull_request] 6 7 # Define the workflow jobs. 8 jobs: 9 verification: 10 name: Commit Verification 11 runs-on: ubuntu-latest 12 if: github.event_name == 'pull_request' 13 timeout-minutes: 5 14 steps: 15 - uses: actions/checkout@v2 16 with: 17 fetch-depth: 0 18 - name: "Perform commit verification" 19 run: | 20 # Determine the target commit range. 21 export VERIFY_COMMIT_START="${{ github.event.pull_request.base.sha }}" 22 export VERIFY_COMMIT_END="${{ github.event.pull_request.head.sha }}" 23 24 # Perform verification. 25 scripts/ci/verify_commits.sh 26 macos: 27 name: macOS 28 runs-on: macos-12 29 timeout-minutes: 90 30 steps: 31 - uses: actions/checkout@v2 32 - uses: actions/setup-go@v2 33 with: 34 go-version: '1.22.2' 35 - name: "Install sha256sum" 36 run: brew install coreutils 37 - run: scripts/ci/setup_go.sh 38 - run: scripts/ci/setup_ssh.sh 39 - run: scripts/ci/setup_partitions_darwin.sh 40 - run: scripts/ci/analyze.sh 41 - run: scripts/ci/test.sh 42 - run: scripts/ci/build.sh 43 env: 44 MACOS_CODESIGN_IDENTITY: ${{ secrets.MACOS_CODESIGN_IDENTITY }} 45 MACOS_CODESIGN_CERTIFICATE_AND_KEY: ${{ secrets.MACOS_CODESIGN_CERTIFICATE_AND_KEY }} 46 MACOS_CODESIGN_CERTIFICATE_AND_KEY_PASSWORD: ${{ secrets.MACOS_CODESIGN_CERTIFICATE_AND_KEY_PASSWORD }} 47 - run: scripts/ci/notarize.sh 48 if: github.ref_type == 'tag' 49 env: 50 MACOS_NOTARIZE_APPLE_ID: ${{ secrets.MACOS_NOTARIZE_APPLE_ID }} 51 MACOS_NOTARIZE_APP_SPECIFIC_PASSWORD: ${{ secrets.MACOS_NOTARIZE_APP_SPECIFIC_PASSWORD }} 52 MACOS_NOTARIZE_TEAM_ID: ${{ secrets.MACOS_NOTARIZE_TEAM_ID }} 53 - run: scripts/ci/sha256sum.sh 54 - uses: crazy-max/ghaction-import-gpg@v3 55 id: import_gpg 56 if: github.ref_type == 'tag' 57 with: 58 gpg-private-key: ${{ secrets.GPG_SIGNING_KEY }} 59 passphrase: ${{ secrets.GPG_SIGNING_KEY_PASSWORD }} 60 - run: scripts/ci/sha256sign.sh 61 if: github.ref_type == 'tag' 62 env: 63 SHA256_GPG_SIGNING_IDENTITY: ${{ steps.import_gpg.outputs.email }} 64 - uses: actions/upload-artifact@v2 65 with: 66 name: bundles 67 path: build/release/* 68 retention-days: 2 69 linux: 70 name: Linux 71 runs-on: ubuntu-latest 72 timeout-minutes: 30 73 strategy: 74 matrix: 75 goversion: ['1.21.9', '1.22.2'] 76 steps: 77 - uses: actions/checkout@v2 78 - uses: actions/setup-go@v2 79 with: 80 go-version: ${{ matrix.goversion }} 81 - run: scripts/ci/setup_go.sh 82 - run: scripts/ci/setup_ssh.sh 83 - run: scripts/ci/setup_docker.sh 84 - run: scripts/ci/analyze.sh 85 - run: scripts/ci/test.sh 86 - run: scripts/ci/test_386.sh 87 - run: scripts/ci/build.sh 88 windows: 89 name: Windows 90 runs-on: windows-latest 91 timeout-minutes: 60 92 steps: 93 - uses: actions/checkout@v2 94 - uses: actions/setup-go@v2 95 with: 96 go-version: '1.22.2' 97 - run: scripts/ci/setup_go.sh 98 shell: bash 99 - run: scripts/ci/setup_docker.sh 100 shell: bash 101 - run: diskpart /s scripts\ci\setup_partitions_windows.txt 102 - run: scripts/ci/analyze.sh 103 shell: bash 104 - run: scripts/ci/test.sh 105 shell: bash 106 - run: scripts/ci/test_386.sh 107 shell: bash 108 - run: scripts/ci/build.sh 109 shell: bash 110 sidecar: 111 name: Sidecar 112 runs-on: ubuntu-latest 113 needs: [macos, linux, windows] 114 timeout-minutes: 30 115 steps: 116 - uses: actions/checkout@v2 117 - uses: actions/setup-go@v2 118 with: 119 go-version: '1.22.2' 120 - uses: docker/setup-qemu-action@v1 121 - uses: docker/setup-buildx-action@v1 122 - uses: docker/login-action@v1 123 if: github.ref_type == 'tag' 124 with: 125 username: ${{ secrets.SIDECAR_DEPLOYMENT_USER }} 126 password: ${{ secrets.SIDECAR_DEPLOYMENT_TOKEN }} 127 - name: "Determine sidecar tag" 128 id: tag 129 run: echo ::set-output name=tag::$(go run scripts/ci/sidecar_tag.go) 130 - uses: docker/build-push-action@v2 131 with: 132 file: images/sidecar/linux/Dockerfile 133 target: mit 134 tags: ${{ steps.tag.outputs.tag }} 135 push: ${{ github.ref_type == 'tag' }} 136 platforms: | 137 linux/386 138 linux/amd64 139 linux/arm/v6 140 linux/arm/v7 141 linux/arm64/v8 142 linux/ppc64le 143 - uses: docker/build-push-action@v2 144 with: 145 file: images/sidecar/linux/Dockerfile 146 target: sspl 147 tags: ${{ steps.tag.outputs.tag }}-sspl 148 push: ${{ github.ref_type == 'tag' }} 149 platforms: | 150 linux/386 151 linux/amd64 152 linux/arm/v6 153 linux/arm/v7 154 linux/arm64/v8 155 linux/ppc64le 156 release: 157 name: Release 158 runs-on: ubuntu-latest 159 if: github.ref_type == 'tag' 160 needs: [macos, linux, windows, sidecar] 161 timeout-minutes: 10 162 steps: 163 - uses: actions/download-artifact@v2 164 with: 165 name: bundles 166 path: bundles 167 - uses: alexellis/upload-assets@0.2.3 168 env: 169 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 170 with: 171 asset_paths: '["bundles/*"]'