Skip to content

Commit

Permalink
chore(large-ci) re-enable macOS jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
casimiro authored and thibaultcha committed Jun 27, 2024
1 parent 0ae504d commit 3d7193b
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 7 deletions.
3 changes: 2 additions & 1 deletion .github/actions/setup-httpbin-server/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ runs:
if: ${{ inputs.os == 'macos-latest' }}
shell: bash
run: |
brew install dnsmasq
brew install dnsmasq docker
colima start --network-address
- name: Setup Docker image tag
id: setup
shell: bash
Expand Down
31 changes: 30 additions & 1 deletion .github/workflows/ci-large.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ jobs:
matrix:
label: [""]
os: [ubuntu-latest]
#os: [ubuntu-latest, macos-latest]
cc: [gcc-12]
ngx: [1.27.0]
runtime: [wasmtime, wasmer, v8]
Expand All @@ -47,6 +46,35 @@ jobs:
debug: debug
hup: no_hup
module_type: static
# macOS - Wasmer (full)
- runtime: wasmer
wasmer: 3.1.1
os: macos-latest
cc: clang
ngx: 1.25.4
ssl: ssl
debug: debug
hup: no_hup
# macOS - Wasmtime
- runtime: wasmtime
wasmtime: 19.0.0
os: macos-latest
cc: clang
ngx: 1.25.4
ssl: ssl
debug: debug
hup: hup
path: t/01-wasm
# macOS - V8
- runtime: v8
v8: 12.0.267.17
os: macos-latest
cc: clang
ngx: 1.25.4
ssl: ssl
debug: debug
hup: no_hup
path: t/01-wasm
uses: ./.github/workflows/job-unit-tests.yml
with:
os: ${{ matrix.os }}
Expand All @@ -62,6 +90,7 @@ jobs:
debug: ${{ matrix.debug }}
hup: ${{ matrix.hup }}
module_type: ${{ matrix.module_type }}
path: ${{ matrix.path }}

valgrind:
name: 'Valgrind'
Expand Down
26 changes: 21 additions & 5 deletions .github/workflows/job-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ on:
module_type:
required: true
type: string
path:
required: false
type: string
coverage:
required: false
type: boolean
Expand Down Expand Up @@ -76,6 +79,9 @@ jobs:
- name: 'Setup deps - apt-get'
if: ${{ contains(inputs.os, 'ubuntu') }}
run: sudo apt-get update && sudo apt-get install -y ${CC} libstdc++-${CC#*-}-dev lcov
- name: 'Setup deps - macOS'
if: ${{ contains(inputs.os, 'macos') }}
run: brew install lcov
- uses: actions/checkout@v4
- name: 'Setup cache - rustup toolchain'
if: ${{ !env.ACT }}
Expand Down Expand Up @@ -127,14 +133,24 @@ jobs:
- name: Run tests
run: |
ulimit -c unlimited
make test
IN_PATH="${{ inputs.path != '' && inputs.path || 't/0*' }}"
./util/test.sh ${IN_PATH}
- name: Run lcov
id: lcov
if: ${{ !env.ACT && inputs.coverage }}
run: |
lcov --gcov-tool gcov-${CC#*-} --capture --directory work/buildroot --output-file lcov.info
lcov --gcov-tool gcov-${CC#*-} --remove lcov.info "*/ngx_wasm_module/src/common/debug/*" --output-file lcov.info
lcov --gcov-tool gcov-${CC#*-} --extract lcov.info "*/ngx_wasm_module/src/*" --output-file lcov.info
case "$CC" in
clang*)
lcov --gcov-tool gcov --capture --directory work/buildroot --base-directory work/nginx-patched --output-file lcov.info
lcov --gcov-tool gcov --remove lcov.info "*/ngx_wasm_module/src/common/debug/*" --output-file lcov.info
lcov --gcov-tool gcov --extract lcov.info "*/ngx_wasm_module/src/*" --output-file lcov.info
;;
*)
lcov --gcov-tool gcov-${CC#*-} --capture --directory work/buildroot --output-file lcov.info
lcov --gcov-tool gcov-${CC#*-} --remove lcov.info "*/ngx_wasm_module/src/common/debug/*" --output-file lcov.info
lcov --gcov-tool gcov-${CC#*-} --extract lcov.info "*/ngx_wasm_module/src/*" --output-file lcov.info
;;
esac
name="unit"
if [ -n "${{ inputs.openresty }}" ]; then
Expand Down Expand Up @@ -174,7 +190,7 @@ jobs:
uses: actions/upload-artifact@v4
if: ${{ failure() && !env.ACT }}
with:
name: ${{ github.job }}-sha-${{ github.sha }}-run-${{ github.run_number }}-${{ inputs.ngx != '' && format('nginx-{0}', inputs.ngx) || format('openresty-{0}', inputs.openresty) }}-${{ inputs.runtime }}-${{ inputs.module_type == 'dynamic' && 'dynamic' || 'static'}}-${{ inputs.ipc }}-${{ inputs.ssl }}-${{ inputs.debug }}-${{ inputs.hup }}
name: ${{ github.job }}-sha-${{ github.sha }}-run-${{ github.run_number }}-${{ inputs.os }}-${{ inputs.ngx != '' && format('nginx-{0}', inputs.ngx) || format('openresty-{0}', inputs.openresty) }}-${{ inputs.runtime }}-${{ inputs.module_type == 'dynamic' && 'dynamic' || 'static'}}-${{ inputs.ipc }}-${{ inputs.ssl }}-${{ inputs.debug }}-${{ inputs.hup }}
path: |
work/buildroot/
t/servroot*
Expand Down

0 comments on commit 3d7193b

Please sign in to comment.