-
Notifications
You must be signed in to change notification settings - Fork 10
89 lines (80 loc) · 2.71 KB
/
codeql-analysis.yml
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
name: "CodeQL"
on:
push:
branches: [master]
pull_request:
# The branches below must be a subset of the branches above
branches: [master]
schedule:
- cron: '0 3 * * 2'
jobs:
analyze:
name: Analyze
runs-on: ubuntu-20.04
steps:
- name: Checkout repository
uses: actions/checkout@v2
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
# Override language selection by uncommenting this and choosing your languages
# with:
# languages: go, javascript, csharp, python, cpp, java
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
#- name: Autobuild
# uses: github/codeql-action/autobuild@v1
# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
- run: |
sudo apt update
sudo apt install -y libsodium-dev pkgconf # build-essential git
# liboprf
git clone https://github.com/stef/liboprf/
cd liboprf
sudo PREFIX=/usr make install
# main libopaque
cd ../src
git submodule update --init --recursive tests/munit
make OPRFHOME=../liboprf debug test # Test a debug build.
make OPRFHOME=../liboprf clean all test # Test a production build.
sudo PREFIX=/usr make install
# python3
cd ../python/test
sudo apt install -y python3-pip
pip3 install pysodium
LD_LIBRARY_PATH="$(pwd)/../../src" PYTHONPATH="$(pwd)/.." python3 simple.py
# php7
cd ../../php7
sudo apt install -y php php-dev
phpize
LIBOPAQUE_CFLAGS='-I ../src' LIBOPAQUE_LIBS='-lopaque' ./configure
LD_LIBRARY_PATH=../src TEST_PHP_ARGS=-q make EXTRA_CFLAGS=-I../src EXTRA_LDFLAGS=-L../src test
# ruby
cd ../ruby
sudo apt install -y ruby ruby-dev
ruby extconf.rb
make
./test.rb
# lua
cd ../lua
sudo apt install -y lua5.3 liblua5.3-dev
make
./test.lua
# java
cd ../java
sudo apt install -y openjdk-11-jdk openjdk-11-jre
make JAVAINCLUDES=/usr/lib/jvm/java-11-openjdk-amd64/include all test
# erlang
sudo apt install -y erlang
cd ../erlang
make all test
# golang
sudo apt install -y golang
cd ../go
make tests
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1