Repository navigation
94 lines (88 loc) · 3.35 KB
/
Copy pathswift.yml
File metadata and controls
94 lines (88 loc) · 3.35 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
name: build_test
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build_test:
timeout-minutes: 40
strategy:
# If macos-latest fails, we still don't want to cancel ubuntu-latest or the other way around.
fail-fast: false
matrix:
os: [macos-latest, ubuntu-latest]
kind: [debug]
include:
# On linux also build and test release.
- os: ubuntu-latest
kind: release
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v7
- name: Install jsvu
run: npm install jsvu -g
- name: Install d8
run: jsvu --os=default --engines=v8
- name: d8 version
run: ~/.jsvu/engines/v8/v8 --version
# TODO(mliedtke): This is too slow in comparison to its limited benefit. Decide what to do
# with it, either drop it or find a better way of testing this.
#
# - name: Install Binaryen
# run: |
# Tools/bootstrap-binaryen.sh ~/.binaryen
# echo "$HOME/.binaryen/bin" >> $GITHUB_PATH
- name: Install Node.js dependencies for Compiler/Parser tests
working-directory: ./Sources/Fuzzilli/Compiler/Parser
run: npm install
- uses: actions/setup-node@v7
with:
node-version: 27-nightly
- name: V8 version used by Node.js
run: node -p process.versions.v8
- name: Swift Version
run: swift --version
- name: Build
run: swift build -c ${{ matrix.kind }}
- name: Install protobuf
# Install protoc so the presubmit can also validate the generated *.pb.swift files.
if: ${{ matrix.os == 'ubuntu-latest' && matrix.kind == 'debug' }}
run: sudo apt update && sudo apt install -y protobuf-compiler
- name: Run presubmit checks
if: ${{ matrix.os == 'ubuntu-latest' && matrix.kind == 'debug' }}
run: python3 Tools/presubmit.py
- name: Run tests with Node.js
run: Tools/run_tests.py Tests/failing_nodejs.txt -c ${{ matrix.kind }} --no-parallel
- name: Run tests with d8
run: FUZZILLI_TEST_SHELL=~/.jsvu/engines/v8/v8 Tools/run_tests.py Tests/failing_jsvu.txt -c ${{ matrix.kind }} --no-parallel
asan:
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Install jsvu
run: npm install jsvu -g
- name: Install d8
run: jsvu --os=default --engines=v8
- name: d8 version
run: ~/.jsvu/engines/v8/v8 --version
# TODO(mliedtke): This is too slow in comparison to its limited benefit. Decide what to do
# with it, either drop it or find a better way of testing this.
#
# - name: Install Binaryen
# run: |
# Tools/bootstrap-binaryen.sh ~/.binaryen
# echo "$HOME/.binaryen/bin" >> $GITHUB_PATH
- name: Swift Version
run: swift --version
- name: Install LLVM
run: sudo apt update && sudo apt install -y llvm
- name: Run tests with leak sanitization
run: |
set -o pipefail
export ASAN_SYMBOLIZER_PATH=$(which llvm-symbolizer)
export FUZZILLI_TEST_SHELL=~/.jsvu/engines/v8/v8
export ASAN_OPTIONS=detect_leaks=1
export LSAN_OPTIONS=suppressions=$PWD/Tests/lsan_suppressions.txt
swift test --sanitize=address --no-parallel 2>&1 | swift demangle