-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from pjbgf/macos
Add GitHub workflows to build and test
- Loading branch information
Showing
14 changed files
with
125 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
|
||
name: build | ||
jobs: | ||
|
||
ubuntu: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Install libapparmor-dev | ||
run: sudo apt-get install -y libapparmor-dev | ||
- name: Build | ||
run: | | ||
make build | ||
- name: Build Example Code | ||
run: | | ||
make example | ||
macos: | ||
runs-on: macos-latest | ||
env: | ||
BUILD_TAGS: "netgo" | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Build | ||
run: | | ||
make build | ||
- name: Build Example Code | ||
run: | | ||
make example |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
on: | ||
pull_request: {} | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
- master | ||
name: Semgrep | ||
jobs: | ||
semgrep: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
module github.com/pjbgf/go-apparmor/example/code | ||
|
||
go 1.17 | ||
go 1.18 | ||
|
||
replace github.com/pjbgf/go-apparmor => ../.. | ||
|
||
require ( | ||
github.com/bombsimon/logrusr/v2 v2.0.1 | ||
github.com/pjbgf/go-apparmor v0.0.5 | ||
github.com/sirupsen/logrus v1.8.1 | ||
) | ||
|
||
replace github.com/pjbgf/go-apparmor => ../.. | ||
|
||
require ( | ||
github.com/go-logr/logr v1.2.0 // indirect | ||
golang.org/x/sys v0.0.0-20211107104306-e0b2ad06fe42 // indirect | ||
github.com/go-logr/logr v1.2.3 // indirect | ||
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab // indirect | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
module github.com/pjbgf/go-apparmor | ||
|
||
go 1.17 | ||
go 1.18 | ||
|
||
require ( | ||
github.com/go-logr/logr v1.2.3 | ||
golang.org/x/sys v0.0.0-20220808155132-1c4a2a72c664 | ||
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,4 @@ | ||
github.com/go-logr/logr v0.4.0 h1:K7/B1jt6fIBQVd4Owv2MqGQClcgf0R266+7C/QjRcLc= | ||
github.com/go-logr/logr v0.4.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= | ||
github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0= | ||
github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= | ||
golang.org/x/sys v0.0.0-20211107104306-e0b2ad06fe42 h1:G2DDmludOQZoWbpCr7OKDxnl478ZBGMcOhrv+ooX/Q4= | ||
golang.org/x/sys v0.0.0-20211107104306-e0b2ad06fe42/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= | ||
golang.org/x/sys v0.0.0-20220808155132-1c4a2a72c664 h1:v1W7bwXHsnLLloWYTVEdvGvA7BHMeBYsPcF0GLDxIRs= | ||
golang.org/x/sys v0.0.0-20220808155132-1c4a2a72c664/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= | ||
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab h1:2QkjZIsXupsJbJIdSjjUOgWK3aEtzyuh2mPt3l/CkeU= | ||
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
//go:build linux && apparmor | ||
// +build linux,apparmor | ||
|
||
package apparmor | ||
|
||
import ( | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
//go:build !linux || !apparmor | ||
// +build !linux !apparmor | ||
|
||
package apparmor | ||
|
||
func NewAppArmor() aa { | ||
return &unsupported{} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
//go:build linux | ||
// +build linux | ||
|
||
package hostop | ||
|
||
import ( | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
//go:build !linux | ||
// +build !linux | ||
|
||
package hostop | ||
|
||
import ( | ||
logr "github.com/go-logr/logr" | ||
) | ||
|
||
type mountHostOp struct { | ||
} | ||
|
||
func NewMountHostOp() HostOp { | ||
return &mountHostOp{} | ||
} | ||
|
||
func (m *mountHostOp) WithLogger(logger logr.Logger) HostOp { | ||
return m | ||
} | ||
|
||
func (m *mountHostOp) Do(action func() error) error { | ||
return nil | ||
} |