Skip to content

Bump github.com/santhosh-tekuri/jsonschema/v5 from 5.2.0 to 5.3.1 #175

Bump github.com/santhosh-tekuri/jsonschema/v5 from 5.2.0 to 5.3.1

Bump github.com/santhosh-tekuri/jsonschema/v5 from 5.2.0 to 5.3.1 #175

Workflow file for this run

name: CI
on:
push:
branches: [ master , develop ]
tags: [ "v*" ]
pull_request:
branches: [ master , develop ]
jobs:
setup:
runs-on: ubuntu-latest
strategy:
matrix:
yara-version: [ "v4.3.1" ]
steps:
- uses: actions/checkout@v3
- name: Build yara
uses: ./.github/actions/install-yara
with:
yara-version: ${{ matrix.yara-version }}
cache: 'true'
skip-install: 'true'
test:
runs-on: ubuntu-latest
needs: setup
strategy:
matrix:
go-version: [ "1.18", "1.19", "1.20" ]
yara-version: [ "v4.3.1" ]
steps:
- uses: actions/checkout@v3
- name: Install dependencies
uses: ./.github/actions/install-yara
with:
yara-version: ${{ matrix.yara-version }}
cache: 'true'
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
cache: true
cache-dependency-path: go.sum
- name: Running unit tests
run: go test -race -coverprofile=coverage.txt -covermode=atomic -coverpkg="$coverpkg" -v $(go list ./... | grep -v /acceptanceTests)
env:
coverpkg: github.com/fkie-cad/yapscan/...
- name: Running acceptance tests
run: go test -race -coverprofile=coverage.txt -covermode=atomic -coverpkg="$coverpkg" -v -quickchecks=${QUICKCHECKS:-100} -short .
env:
coverpkg: github.com/fkie-cad/yapscan/...
working-directory: acceptanceTests
- name: Consolidating coverage
run: cat acceptanceTests/coverage.txt | tail -n+2 >> coverage.txt && rm acceptanceTests/coverage.txt
- name: Upload coverage
uses: actions/upload-artifact@v3
with:
name: coverage-linux-${{ matrix.go-version }}-${{ matrix.yara-version }}
path: coverage.txt
- name: Codecov
uses: codecov/codecov-action@v3
build-linux:
runs-on: ubuntu-latest
needs: setup
strategy:
matrix:
go-version: [ "1.18", "1.19", "1.20" ]
yara-version: [ "v4.3.1" ]
openssl-version: [ "OpenSSL_1_1_1-stable" ]
steps:
- uses: actions/checkout@v3
- name: Install dependencies
uses: ./.github/actions/install-yara
with:
yara-version: ${{ matrix.yara-version }}
cache: 'true'
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
cache: true
cache-dependency-path: go.sum
- run: mkdir -p cicd/build/
- name: Building yapscan for linux
run: go build -trimpath -o ../../cicd/build/yapscan
working-directory: cmd/yapscan
- name: Upload linux build
uses: actions/upload-artifact@v3
if: ${{ matrix.go-version == '1.20' }}
with:
name: yapscan-linux
path: cicd/build/yapscan
- name: Gather linux deps
uses: ./.github/actions/gather-linux-deps
- name: Upload linux deps
uses: actions/upload-artifact@v3
if: ${{ matrix.go-version == '1.20' }}
with:
name: deps-linux
path: |
cicd/build/libyara.so*
cicd/build/libcrypto.so*
cicd/build/libyara.license
build-windows:
runs-on: ubuntu-latest
needs: setup
if: github.event_name != 'pull_request' # pull_request events don't have access to secrets
strategy:
matrix:
go-version: [ "1.18", "1.19", "1.20" ]
yara-version: [ "v4.3.1" ]
openssl-version: [ "OpenSSL_1_1_1-stable" ]
steps:
- uses: actions/checkout@v3
- name: Docker Login
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Caching docker images
uses: satackey/[email protected]
continue-on-error: true
- name: Crossbuild for windows
uses: ./.github/actions/crossbuild-windows
with:
openssl-version: ${{ matrix.openssl-version }}
yara-version: ${{ matrix.yara-version }}
go-version: ${{ matrix.go-version }}
- name: Upload windows build
uses: actions/upload-artifact@v3
if: ${{ matrix.go-version == '1.20' }}
with:
name: yapscan-windows
path: |
cicd/build/yapscan.exe
cicd/build/yapscan.dll
cicd/build/libyara.license
release:
runs-on: ubuntu-latest
needs: [ build-linux, build-windows, test ]
permissions:
contents: write
if: startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/checkout@v3
- run: mkdir yapscan_linux_amd64 yapscan_windows_amd64
- name: Download linux build
uses: actions/download-artifact@v3
with:
name: yapscan-linux
path: yapscan_linux_amd64
- name: Download linux build
uses: actions/download-artifact@v3
with:
name: yapscan-linux
path: yapscan_linux_amd64
- name: Download linux dependencies
uses: actions/download-artifact@v3
with:
name: deps-linux
path: yapscan_windows_amd64
- name: Download windows build
uses: actions/download-artifact@v3
with:
name: yapscan-windows
path: yapscan_windows_amd64
- name: Create linux TAR archive
run: tar -cvf - yapscan_linux_amd64/ | zstd -12 - -o yapscan_linux_amd64.tar.zst
- name: Create linux ZIP archive
run: 7z a yapscan_linux_amd64.zip yapscan_linux_amd64/
- name: Create windows TAR archive
run: tar -cvf - yapscan_windows_amd64/ | zstd -12 - -o yapscan_windows_amd64.tar.zst
- name: Create windows ZIP archive
run: 7z a yapscan_windows_amd64.zip yapscan_windows_amd64/
- name: Create release
uses: softprops/action-gh-release@v1
with:
draft: true
files: |
yapscan_linux_amd64.tar.zst
yapscan_linux_amd64.zip
yapscan_windows_amd64.tar.zst
yapscan_windows_amd64.zip