File: reprotest.yaml

package info (click to toggle)
tiup 1.16.3-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 6,384 kB
  • sloc: sh: 1,988; makefile: 138; sql: 16
file content (66 lines) | stat: -rw-r--r-- 1,636 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# Check for reproducible build

name: reprotest

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
  pull_request:
    branches:
      - master
      - release-*
      - feature/*
    paths-ignore:
      - '**.html'
      - '**.md'
      - 'CNAME'
      - 'LICENSE'
      - 'doc/**'
      - 'embed/templates/examples/**'
  push:
    branches:
      - release-*
    paths-ignore:
      - '**.html'
      - '**.md'
      - 'CNAME'
      - 'LICENSE'
      - 'doc/**'
      - 'embed/templates/examples/**'

jobs:
  reprotest:
    # The type of runner that the job will run on
    runs-on: ubuntu-22.04

    strategy:
      matrix:
        go:
          - 1.21.x

    # Steps represent a sequence of tasks that will be executed as part of the job
    steps:
      - uses: actions/checkout@v3

      - name: Set up Go ${{ matrix.go }}
        uses: actions/setup-go@v4
        with:
          go-version: ${{ matrix.go }}

      - name: Install reprotest and prepare
        id: prepare_env
        run: |
          echo ::set-output name=GOROOT::$GOROOT
          echo ::set-output name=GOPATH::$GOPATH
          sudo apt-get update && sudo apt-get -qy install reprotest

      - name: Check for reproducible build
        run: |
          sudo reprotest \
            "make clean && \
            GOROOT=${{ steps.prepare_env.GOROOT }} \
            GOPATH=${{ steps.prepare_env.GOPATH }} \
            PATH=$GOROOT/bin:$PATH \
            BUILD_FLAGS='-trimpath -buildmode=pie -mod=readonly -modcacherw -buildvcs=false' \
            make build" \
          bin