Skip to content

Commit

Permalink
Update workflows to only use v3 directory
Browse files Browse the repository at this point in the history
Also, disable fuzzing until configured correctly in upstream repo
  • Loading branch information
johnweldon committed Dec 26, 2024
1 parent 9c0ac95 commit c3823ed
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 75 deletions.
63 changes: 32 additions & 31 deletions .github/workflows/cifuzz.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,35 @@ name: CIFuzz
on: [pull_request]
permissions: {}
jobs:
Fuzzing:
runs-on: ubuntu-latest
permissions:
security-events: write
steps:
- name: Build Fuzzers
id: build
uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master
with:
oss-fuzz-project-name: 'go-ldap'
language: go
- name: Run Fuzzers
uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master
with:
oss-fuzz-project-name: 'go-ldap'
language: go
fuzz-seconds: 300
output-sarif: true
- name: Upload Crash
uses: actions/upload-artifact@v3
if: failure() && steps.build.outcome == 'success'
with:
name: artifacts
path: ./out/artifacts
- name: Upload Sarif
if: always() && steps.build.outcome == 'success'
uses: github/codeql-action/upload-sarif@v2
with:
# Path to SARIF file relative to the root of the repository
sarif_file: cifuzz-sarif/results.sarif
checkout_path: cifuzz-sarif
Fuzzing:
if: false # Until go-fuzz project is updated to use v3 directory
runs-on: ubuntu-latest
permissions:
security-events: write
steps:
- name: Build Fuzzers
id: build
uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master
with:
oss-fuzz-project-name: "go-ldap"
language: go
- name: Run Fuzzers
uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master
with:
oss-fuzz-project-name: "go-ldap"
language: go
fuzz-seconds: 300
output-sarif: true
- name: Upload Crash
uses: actions/upload-artifact@v3
if: failure() && steps.build.outcome == 'success'
with:
name: artifacts
path: ./out/artifacts
- name: Upload Sarif
if: always() && steps.build.outcome == 'success'
uses: github/codeql-action/upload-sarif@v2
with:
# Path to SARIF file relative to the root of the repository
sarif_file: cifuzz-sarif/results.sarif
checkout_path: cifuzz-sarif
5 changes: 3 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: golangci-lint
on:
pull_request:
branches: [ master ]
branches: [master]

permissions:
contents: read
Expand All @@ -13,11 +13,12 @@ jobs:
steps:
- uses: actions/setup-go@v5
with:
go-version: '1.23'
go-version: "1.23"
cache: false
- uses: actions/checkout@v4
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: latest
only-new-issues: true
working-directory: v3
74 changes: 32 additions & 42 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,54 +2,44 @@ name: PR

on:
pull_request:
branches: [ master ]
branches: [master]

jobs:
build:
build-and-test:
runs-on: ubuntu-latest
strategy:
matrix:
go: [
'1.23',
'1.22',
'1.21',
'1.20',
'1.19',
'1.18',
'1.17',
'1.16',
'1.15',
'1.14',
]
branch: [ '.', './v3' ]
name: Go ${{ matrix.go }}.x PR Validate ${{ matrix.branch }} (Modules)
go:
[
"1.23",
"1.22",
"1.21",
"1.20",
"1.19",
"1.18",
"1.17",
"1.16",
"1.15",
"1.14",
]
directory: ["./v3"]
name: Go ${{ matrix.go }}.x PR Validate ${{ matrix.directory }} (Modules)
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Checkout code
uses: actions/checkout@v4

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

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

- name: Build and Validate
run: |
cd ${{ matrix.branch }}
go vet .
go test .
go test -cover -race -cpu 1,2,4 .
go build .
- name: Version
run: go version

lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: latest
only-new-issues: true
- name: Build, Validate, and Test
run: |
cd ${{ matrix.directory }}
go vet .
go test .
go test -cover -race -cpu 1,2,4 .
go build .

0 comments on commit c3823ed

Please sign in to comment.