-
Notifications
You must be signed in to change notification settings - Fork 10
68 lines (61 loc) · 1.85 KB
/
job-build-tests.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
name: Build tests
on:
workflow_call:
inputs:
os:
required: true
type: string
cc:
required: true
type: string
ngx:
required: true
type: string
runtime:
required: true
type: string
wasmtime:
required: true
type: string
wasmer:
required: true
type: string
v8:
required: true
type: string
defaults:
run:
shell: bash
env:
CC: ${{ inputs.cc }}
NGX_WASM_RUNTIME: ${{ inputs.runtime }}
jobs:
build:
name: 'Build'
#if: ${{ false }}
runs-on: ${{ inputs.os }}
timeout-minutes: 45
steps:
- name: 'Setup Ubuntu deps - gcc'
if: ${{ !env.ACT && contains(inputs.os, 'ubuntu') && contains(inputs.cc, 'gcc') }}
run: sudo apt-get update && sudo apt-get install -y ${CC} libstdc++-${CC#*-}-dev
- name: 'Setup Ubuntu deps - clang'
if: ${{ !env.ACT && contains(inputs.os, 'ubuntu') && contains(inputs.cc, 'clang') }}
run: sudo apt-get update && sudo apt-get install -y ${CC}
- name: 'Setup macOS deps'
if: ${{ !env.ACT && contains(inputs.os, 'macos') }}
run: brew install ninja openssh
- uses: actions/checkout@v4
- name: 'Setup cache - work/ dir'
uses: actions/cache@v4
if: ${{ !env.ACT }}
with:
path: |
work/downloads
work/runtimes
work/openssl
key: work-${{ runner.os }}-${{ inputs.cc }}-${{ inputs.ngx }}-${{ inputs.runtime }}-${{ hashFiles('util/**/*.sh', 'util/**/*.pl', 'util/**/*.awk', '.github/**/*.yml', '.github/**/*.sh', '.github/**/*.js', 'rust-toolchain', 'Makefile') }}
- name: Setup Wasm runtime
run: ./util/runtime.sh -R ${{ inputs.runtime }} -V ${{ inputs[inputs.runtime] }}
- run: make setup
- run: make test-build