-
Notifications
You must be signed in to change notification settings - Fork 149
90 lines (87 loc) · 2.99 KB
/
ci.yml
File metadata and controls
90 lines (87 loc) · 2.99 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
name: CI
on:
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]
schedule:
- cron: '30 15 * * *' # 3:30pm every day
env:
CARGO_TERM_COLOR: always
jobs:
continuous-integration:
runs-on: ubuntu-24.04
defaults:
run:
shell: bash
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Docker and Prereqs
# This uses a workaround for a known issue with docker. See here: https://github.com/actions/virtual-environments/issues/5490#issuecomment-1118328567
run: |
sudo apt-get update
sudo apt-get install build-essential curl -y
sudo apt-get install runc containerd docker.io -y || true
sudo rm -f /etc/docker/daemon.json
sudo systemctl restart docker
sudo gpasswd -a $USER docker
- name: Install rustc and clippy nightly
uses: dtolnay/rust-toolchain@stable
with:
toolchain: nightly-2025-02-15 #make sure this matches the version in the rust-toolchain files
components: cargo, rustc, clippy, rustfmt
target: wasm32-unknown-unknown
- name: Setup rust dependency caching
uses: Swatinem/rust-cache@v2
with:
workspaces: "wasm-worker-> target"
- name: Install golang
uses: actions/setup-go@v5
with:
go-version: '>=1.21'
- name: Set up Python 3
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install pylint
run: pip3 install pylint==3.3.3
- name: Install revive (go linter)
run: go install github.com/mgechev/[email protected]
- name: Install cross
run: cargo install cross --locked
- name: Build OpenLambda
run: |
make ol imgs/ol-wasm wasm-worker wasm-functions native-functions container-proxy
make install-python-bindings
make sudo-install
- name: Test Go Common
working-directory: go/common
run: go test -v
timeout-minutes: 5
- name: Test Go Worker
working-directory: go/worker
run: go test -v ./...
timeout-minutes: 5
- name: Test Python (SOCK)
run: sudo env "PATH=$PATH" ./scripts/test.py --worker_type=sock
timeout-minutes: 20
- name: Test Python (Docker)
# not all features are supported by docker yet, so we only run some of the tests
run: sudo env "PATH=$PATH" ./scripts/test.py --worker_type=docker --test_blocklist=max_mem_alloc
- name: Boss/Lambda Store Tests
run: sudo env "PATH=$PATH" python3 scripts/boss_test.py local
timeout-minutes: 5
- name: Test Binaries (WebAssembly)
timeout-minutes: 10
run: |
sudo rm -f test.json
env RUST_LOG=info ./scripts/bin_test.py --worker_type=wasm
- name: Test Binaries (SOCK)
timeout-minutes: 20
run: sudo env "PATH=$PATH" ./scripts/bin_test.py --worker_type=sock
- name: Test SOCK
timeout-minutes: 20
run: sudo env "PATH=$PATH" ./scripts/sock_test.py
- name: Linting
run: make lint