forked from semgrep/semgrep
-
Notifications
You must be signed in to change notification settings - Fork 0
105 lines (100 loc) · 2.84 KB
/
build-tests.yml
File metadata and controls
105 lines (100 loc) · 2.84 KB
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
name: build-tests
on:
workflow_dispatch:
pull_request:
paths-ignore:
- '**.md'
push:
branches:
- develop
jobs:
build-core:
name: Build and Test semgrep-core
runs-on: ubuntu-latest
container: returntocorp/ocaml:alpine
steps:
- name: Pre-checkout fixes
run: |
sudo chmod -R 777 /github
github_cache_dir="/__w"
sudo mkdir -p "$github_cache_dir"
sudo chmod -R 777 "$github_cache_dir"
- name: Checkout
uses: actions/checkout@v2
with:
submodules: true
- name: Post-checkout fixes
run: ./.github/post-checkout
- name: Build semgrep-core and spacegrep
run: ./scripts/install-alpine-semgrep-core
- name: Upload artifacts
uses: actions/upload-artifact@v1
with:
name: ocaml-build-artifacts
path: ocaml-build-artifacts.tgz
- name: Test semgrep-core
run: |
eval $(opam env)
cd semgrep-core
make test
mac-build:
name: Check builds for macOS
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: true
- name: Setup Python
uses: actions/setup-python@v1
- name: Run OSX build
run: ./scripts/osx-release.sh
- name: Upload artifacts
uses: actions/upload-artifact@v1
with:
name: semgrep-osx
path: artifacts
mac-build-linking-test:
name: Check that semgrep-core runs
runs-on: macos-latest
needs: [mac-build]
steps:
- name: Download artifacts
uses: actions/download-artifact@v1
with:
name: semgrep-osx
path: artifacts
- name: Remove pcre dynamic lib
run: rm /usr/local/opt/pcre/lib/libpcre.1.dylib
- name: Test build artifacts
run: |
chmod +x ./artifacts/semgrep-core
chmod +x ./artifacts/spacegrep
./artifacts/semgrep-core -help
./artifacts/spacegrep --help
release-ubuntu:
name: Check builds for ubuntu
needs: [build-core]
runs-on: ubuntu-latest
container: returntocorp/sgrep-build:ubuntu-16.04
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: true
- name: Download artifacts
uses: actions/download-artifact@v1
with:
name: ocaml-build-artifacts
- name: Install artifacts
run: |
tar xf ocaml-build-artifacts/ocaml-build-artifacts.tgz
mkdir -p semgrep-files
cp ocaml-build-artifacts/bin/* semgrep-files
- name: Run Ubuntu build script
run: ./scripts/ubuntu-release.sh
- name: Upload artifacts
uses: actions/upload-artifact@v1
with:
name: semgrep-ubuntu-16.04-${{ github.sha }}
path: artifacts.tar.gz