github.com/meulengracht/snapd@v0.0.0-20210719210640-8bde69bcc84e/.github/workflows/macos-sanity.yaml (about)

     1  name: MacOS sanity checks
     2  on:
     3    # Only run on pull requests: not pushes
     4    pull_request:
     5      branches: [ "master", "release/**" ]
     6  
     7  jobs:
     8    macos-sanity:
     9      runs-on: macos-latest
    10      env:
    11        GOPATH: ${{ github.workspace }}
    12        GO111MODULE: off
    13      steps:
    14        - uses: actions/setup-go@v2
    15          with:
    16            go-version: "1.14.x"
    17  
    18        - name: Checkout code
    19          uses: actions/checkout@v2
    20          with:
    21            # NOTE: checkout the code in a fixed location, even for forks, as this
    22            # is relevant for go's import system.
    23            path: ./src/github.com/snapcore/snapd
    24  
    25        - name: Install squashfs from homebrew
    26          run: |
    27            brew install squashfs
    28  
    29        - name: Install Go package dependencies
    30          working-directory: ./src/github.com/snapcore/snapd
    31          run: |
    32            ./mkversion.sh
    33            ./get-deps.sh
    34            # extra dependency on darwin:
    35            go get golang.org/x/sys/unix
    36  
    37        - name: Build sanity checks
    38          run: |
    39            go build -tags nosecboot -o /tmp/snp github.com/snapcore/snapd/cmd/snap
    40  
    41        - name: Runtime sanity checks
    42          working-directory: ./src/github.com/snapcore/snapd
    43          run: |
    44            /tmp/snp download hello
    45            /tmp/snp version
    46            # TODO: homebrew appears to be broken, brew install of squashfs fails
    47            # and goes unnoticed by travis
    48            if command -v mksquashfs; then /tmp/snp pack tests/lib/snaps/test-snapd-tools/ /tmp ; fi