@@ -17,56 +17,69 @@ permissions:
1717jobs :
1818 test :
1919 runs-on : mal-ubuntu-latest-8-core
20- env :
21- PKG_CONFIG_PATH : ${{ github.workspace }}
22- LD_LIBRARY_PATH : ${{ github.workspace }}
20+ container : cgr.dev/chainguard/wolfi-base:latest
21+ # env:
22+ # PKG_CONFIG_PATH: ${{ github.workspace }}
23+ # LD_LIBRARY_PATH: ${{ github.workspace }}
2324 steps :
24- - uses : step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
25- with :
26- egress-policy : audit
25+ # - uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
26+ # with:
27+ # egress-policy: audit
28+ - name : Install dependencies
29+ run : |
30+ apk update
31+ apk add curl findutils git go nodejs xz yara-x-compat
2732
2833 - name : Checkout code
2934 uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
3035
31- - uses : actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
32- with :
33- go-version-file : go.mod
34- check-latest : true
36+ - name : Fix workspace permissions
37+ run : |
38+ chown -R $(whoami) /home/runner/work/
3539
36- - uses : chainguard-dev/actions/goimports@9d943fc9889a0c0795e3c2bd4b949a9b610ac02e # main
40+ # - uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
41+ # with:
42+ # go-version-file: go.mod
43+ # check-latest: true
3744
38- - name : install dependencies
39- run : |
40- sudo apt update && sudo apt install xz-utils -y
45+ # - uses: chainguard-dev/actions/goimports@9d943fc9889a0c0795e3c2bd4b949a9b610ac02e # main
4146
42- - name : Clone yara-x
43- uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
44- with :
45- repository : VirusTotal/yara-x
46- path : yara-x
47+ # - name: install dependencies
48+ # run: |
49+ # sudo apt update && sudo apt install xz-utils -y
50+
51+ # - name: Clone yara-x
52+ # uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
53+ # with:
54+ # repository: VirusTotal/yara-x
55+ # path: yara-x
56+
57+ # - name: Setup Rust
58+ # uses: dtolnay/rust-toolchain@315e265cd78dad1e1dcf3a5074f6d6c47029d5aa # ???
59+ # with:
60+ # toolchain: stable
61+
62+ # - name: Install yara-x-capi
63+ # run: |
64+ # cd ${{ github.workspace }}/yara-x
65+ # cargo install cargo-c
66+ # cargo cinstall -p yara-x-capi --release --destdir /tmp/yara-x
67+ # sudo mkdir -p /usr/local/lib
68+ # sudo mkdir -p /usr/local/include
69+ # sudo cp /tmp/yara-x/usr/local/include/yara_x.h /usr/local/include/
70+ # sudo cp -a /tmp/yara-x/usr/local/lib/x86_64-linux-gnu/* /usr/local/lib/
71+ # sudo ldconfig -v
72+ # cd ${{ github.workspace }}
4773
48- - name : Setup Rust
49- uses : dtolnay/rust-toolchain@315e265cd78dad1e1dcf3a5074f6d6c47029d5aa # ???
50- with :
51- toolchain : stable
74+ # - name: golangci-lint
75+ # uses: golangci/golangci-lint-action@971e284b6050e8a5849b72094c50ab08da042db8 # v6.1.1
76+ # with:
77+ # version: v1.62.0
78+ # args: --timeout=5m
5279
53- - name : Install yara-x-capi
80+ - name : Run golangci-lint
5481 run : |
55- cd ${{ github.workspace }}/yara-x
56- cargo install cargo-c
57- cargo cinstall -p yara-x-capi --release --destdir /tmp/yara-x
58- sudo mkdir -p /usr/local/lib
59- sudo mkdir -p /usr/local/include
60- sudo cp /tmp/yara-x/usr/local/include/yara_x.h /usr/local/include/
61- sudo cp -a /tmp/yara-x/usr/local/lib/x86_64-linux-gnu/* /usr/local/lib/
62- sudo ldconfig -v
63- cd ${{ github.workspace }}
64-
65- - name : golangci-lint
66- uses : golangci/golangci-lint-action@971e284b6050e8a5849b72094c50ab08da042db8 # v6.1.1
67- with :
68- version : v1.62.0
69- args : --timeout=5m
82+ make golangci-lint-lint
7083
7184 - name : Unit tests
7285 run : |
0 commit comments