on: push: branches: [master] pull_request: name: Test jobs: test-linux: strategy: matrix: go-version: [1.16.x, 1.17.x, 1.18.x] runs-on: ubuntu-latest steps: - name: Install Go uses: actions/setup-go@v2 with: go-version: ${{ matrix.go-version }} - name: Checkout code uses: actions/checkout@v2 - name: Test run: go test ./... test-linux-tpm12: strategy: matrix: go-version: [1.16.x, 1.17.x, 1.18.x] runs-on: ubuntu-latest steps: - name: Install Go uses: actions/setup-go@v2 with: go-version: ${{ matrix.go-version }} - name: Checkout code uses: actions/checkout@v2 - name: Install libtspi run: sudo apt-get install -y libtspi-dev - name: Test run: go test -tags tspi ./... test-macos: strategy: matrix: go-version: [1.16.x, 1.17.x, 1.18.x] runs-on: macos-latest steps: - name: Install Go uses: actions/setup-go@v2 with: go-version: ${{ matrix.go-version }} - name: Checkout code uses: actions/checkout@v2 # See https://github.com/google/go-tpm-tools#macos-dev - name: Install openssl run: brew install openssl@1.1 - name: Link openssl run: sudo ln -s $(brew --prefix openssl@1.1)/include/openssl /usr/local/include - name: Test run: C_INCLUDE_PATH="$(brew --prefix openssl@1.1)/include" LIBRARY_PATH="$(brew --prefix openssl@1.1)/lib" go test ./... test-windows: strategy: matrix: go-version: [1.16.x, 1.17.x, 1.18.x] runs-on: windows-latest steps: - name: Install Go uses: actions/setup-go@v2 with: go-version: ${{ matrix.go-version }} - name: Checkout code uses: actions/checkout@v2 - name: Test run: go build ./...