github.com/cloudflare/circl@v1.5.0/.github/workflows/ci-actions.yml (about) 1 --- 2 name: CIRCL 3 on: 4 push: 5 branches: 6 - main 7 pull_request: 8 branches: 9 - main 10 jobs: 11 amd64_job: 12 name: Go-${{matrix.GOVER}}/amd64 13 runs-on: ubuntu-22.04 14 strategy: 15 matrix: 16 GOVER: ['1.23', '1.22'] 17 steps: 18 - name: Checkout 19 uses: actions/checkout@v4 20 - name: Setup Go-${{ matrix.GOVER }} 21 uses: actions/setup-go@v5 22 with: 23 go-version: ${{ matrix.GOVER }} 24 - name: Linting 25 uses: golangci/golangci-lint-action@v6 26 with: 27 version: v1.61.0 28 install-mode: goinstall 29 - name: Check shadowing 30 run: | 31 go install golang.org/x/tools/go/analysis/passes/shadow/cmd/shadow@latest 32 go vet -vettool=$(which shadow) ./... 2>&1 | awk -f .etc/action.awk 33 shell: bash 34 - name: Verifying Code 35 run: | 36 go generate -v ./... 37 test -z "$(git status --porcelain)" 38 go vet ./... 39 shell: bash 40 - name: Building 41 run: go build -v ./... 42 - name: Testing 43 run: go test -v -count=1 ./... 44 exotic_job: 45 name: Go-${{matrix.CFG[2]}}/${{matrix.CFG[0]}} 46 needs: [amd64_job] 47 runs-on: ubuntu-22.04 48 strategy: 49 matrix: 50 CFG: [[arm64, arm64v8, '1.22']] 51 steps: 52 - uses: actions/checkout@v4 53 - name: Enabling Docker Experimental 54 run: | 55 echo $'{\n "experimental": true\n}' | sudo tee /etc/docker/daemon.json 56 sudo service docker restart 57 - name: Pulling Images 58 run: | 59 docker pull -q multiarch/qemu-user-static 60 docker pull -q --platform linux/${{matrix.CFG[0]}} ${{matrix.CFG[1]}}/golang:${{matrix.CFG[2]}} 61 docker run --rm --privileged multiarch/qemu-user-static --reset -p yes 62 - name: Testing 63 run: | 64 docker run --rm --platform linux/${{matrix.CFG[0]}} -v `pwd`:`pwd` -w `pwd` ${{matrix.CFG[1]}}/golang:${{matrix.CFG[2]}} go test -v ./... 65 build_modes: 66 needs: [amd64_job] 67 runs-on: ubuntu-22.04 68 name: Testing Build Modes 69 steps: 70 - name: Checkout 71 uses: actions/checkout@v4 72 - name: Setup Go 73 uses: actions/setup-go@v5 74 with: 75 go-version: '1.23' 76 - name: Build as Static 77 run: make circl_static 78 - name: Build as Plugin 79 run: make circl_plugin 80 coverage_amd64_job: 81 needs: [amd64_job] 82 if: github.event_name == 'push' 83 runs-on: ubuntu-22.04 84 name: amd64/coverage 85 steps: 86 - name: Checkout 87 uses: actions/checkout@v4 88 - name: Setup Go 89 uses: actions/setup-go@v5 90 with: 91 go-version: '1.23' 92 - name: Produce Coverage 93 run: go test -coverprofile=./coverage.txt ./... 94 - name: Upload Codecov 95 uses: codecov/codecov-action@v4 96 with: 97 file: ./coverage.txt 98 env: 99 CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} 100 osCompat: 101 runs-on: ${{ matrix.os }} 102 needs: [amd64_job] 103 name: Running on ${{ matrix.os }} 104 strategy: 105 matrix: 106 os: [macos-latest, windows-latest] 107 steps: 108 - name: Checkout 109 uses: actions/checkout@v4 110 - name: Setup Go 111 uses: actions/setup-go@v5 112 with: 113 go-version: '1.23' 114 - name: Building 115 run: go build -v ./... 116 - name: Testing 117 run: go test -v -count=1 ./... 118 analyze: 119 name: Analyze with CodeQL 120 runs-on: ubuntu-latest 121 permissions: 122 actions: read 123 contents: read 124 security-events: write 125 126 steps: 127 - name: Checkout repository 128 uses: actions/checkout@v4 129 - name: Setup Go 130 uses: actions/setup-go@v5 131 with: 132 go-version: '1.23' 133 - name: Initialize CodeQL 134 uses: github/codeql-action/init@v3 135 with: 136 languages: go 137 - name: Perform CodeQL Analysis 138 uses: github/codeql-action/analyze@v3 139 with: 140 category: "/language:go"