-
Notifications
You must be signed in to change notification settings - Fork 49
55 lines (46 loc) · 1.29 KB
/
golang.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Golang package
on:
push:
paths:
- 'go/**'
- '.github/workflows/golang.yaml'
permissions:
contents: read
jobs:
test:
strategy:
fail-fast: false
matrix:
go-version: [ '1.19', '1.20', '1.21.x' ]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go ${{ matrix.go-version }}
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- name: Setup Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
# Install OpenSSL on Windows
- name: Install OpenSSL
if: runner.os == 'Windows'
id: vcpkg
uses: johnwason/vcpkg-action@v5
with:
pkgs: openssl
triplet: x64-windows-static
token: ${{ github.token }}
- name: Set OPENSSL_DIR environment variable
if: runner.os == 'Windows'
shell: bash
run: echo "OPENSSL_DIR=${{ github.workspace }}\\vcpkg\\installed\\x64-windows-static" >> $GITHUB_ENV
- name: Build Rust library
run: cargo build --release --features openssl-static -p yara-x -p yara-x-c
- name: Run Go tests
run: |
cd go
go test -tags static_link