Skip to content

Commit

Permalink
.github/workflows/coverity-scan.yaml: remove Go-isms
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Murray <[email protected]>
  • Loading branch information
alexmurray committed Oct 22, 2024
1 parent 2f540d8 commit c4e6c75
Showing 1 changed file with 4 additions and 26 deletions.
30 changes: 4 additions & 26 deletions .github/workflows/coverity-scan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,48 +10,26 @@ jobs:
coverity:
runs-on: ubuntu-22.04
environment: normal
env:
GOPATH: ${{ github.workspace }}
# Set PATH to ignore the load of magic binaries from /usr/local/bin and
# to use the go snap automatically. Note that we install go from the
# snap in a step below. Without this we get the GitHub-controlled latest
# version of go.
PATH: /snap/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:${{ github.workspace }}/bin
GOROOT: ""
strategy:
matrix:
gochannel:
- 1.23
unit-scenario:
- normal
if: github.repository == 'alexmurray/snapd'
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
# needed for git commit history
fetch-depth: 0
# NOTE: checkout the code in a fixed location, even for forks, as this
# is relevant for go's import system.
path: ./src/github.com/snapcore/snapd

- name: Download Debian dependencies
run: |
sudo apt clean
sudo apt update
sudo apt build-dep -y "${{ github.workspace }}/src/github.com/snapcore/snapd"
- name: Install the go version
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.gochannel }}
sudo apt build-dep -y .
- name: Get deps
run: |
cd "${{ github.workspace }}/src/github.com/snapcore/snapd"
./get-deps.sh
- name: Configure snap-confine
run: |
cd "${{ github.workspace }}/src/github.com/snapcore/snapd/cmd"
./autogen.sh
- name: Download Coverity Build Tool
Expand All @@ -65,14 +43,14 @@ jobs:
- name: Build with cov-build
run: |
export PATH=$(pwd)/cov-analysis-linux64/bin:$PATH
cd "${{ github.workspace }}/src/github.com/snapcore/snapd/cmd"
cd cmd/
cov-build --dir cov-int make -j$(nproc)
- name: Submit to Coverity Scan
run: |
set -x
export TOKEN="${{ secrets.COVERITY_SCAN_TOKEN }}"
cd "${{ github.workspace }}/src/github.com/snapcore/snapd/cmd"
cd cmd/
version=$(cat VERSION)
tarball="snap-confine-$version.tar.gz"
tar czvf "$tarball" cov-int
Expand Down

0 comments on commit c4e6c75

Please sign in to comment.