Skip to content

feat: add swift demangler (WIP) #672

feat: add swift demangler (WIP)

feat: add swift demangler (WIP) #672

Workflow file for this run

name: Build
on:
push:
pull_request_target:
workflow_dispatch:
env:
TEST_FOLDER: .github/test
jobs:
build_various_platforms:
strategy:
fail-fast: false
matrix:
os:
- ubuntu-24.04
# x86_64
- macos-12
- macos-13
# arm64
- macos-14
- macos-15
runs-on: ${{ matrix.os }}
name: Build and Test on ${{matrix.os}}
steps:
- name: display environment (macOS)
run: |
sysctl -a
if: ${{ matrix.os != 'ubuntu-24.04' }}
- name: install dependencies (macOS)
run: brew update && brew install automake
if: ${{ matrix.os != 'ubuntu-24.04' }}
- name: install dependencies (Linux)
run: sudo apt-get update && sudo apt-get install libc6-dbg gdb
if: ${{ matrix.os == 'ubuntu-24.04' }}
- name: checkout project
uses: actions/checkout@v1
- name: check versions
run: |
autoconf --version
shell: bash
- name: calculate short SHA
id: sha
run: echo "short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: autogen.sh
run: ./autogen.sh
- name: configure
run: ./configure
- name: build
run: make
- name: try ls -l
run: ./vg-in-place --gen-suppressions=all ls -l || ./vg-in-place -v -v -v -v -d -d -d -d -d ls -l
- name: build regression tests
run: make check
- name: create artifacts folder
run: mkdir -p ${{ env.TEST_FOLDER }}/outputs
- name: build tests
run: make check
- name: run regression tests
run: make regtest | tee ${{ env.TEST_FOLDER }}/raw-results.txt
- name: process results
if: always()
run: |
awk '/^== [0-9]+ tests, .* ==$/{flag=1;next}/^$/{flag=0}flag' < ${{ env.TEST_FOLDER }}/raw-results.txt | tee ${{ env.TEST_FOLDER }}/results.txt | while read line; do
TEST_NAME=$(echo "$line" | cut -f 1 -d' ')
if grep -q $TEST_NAME .github/flaky-tests.txt && [ "${{ matrix.os != 'ubuntu-24.04' }}" == "true" ]; then
echo "skipping flaky test $TEST_NAME"
else
echo "$line" >> ${{ env.TEST_FOLDER }}/filtered-results.txt
fi
done
shell: bash
- name: copy failing test outputs
if: always()
run: cat ${{ env.TEST_FOLDER }}/results.txt | cut -f 1 -d' ' | xargs -L1 -I % sh -c 'cp %.*.diff* ${{ env.TEST_FOLDER }}/outputs/'
- name: calculate difference between tests
if: always()
uses: LouisBrunner/diff-action@v2.0.0
with:
old: .github/${{ matrix.os }}-expected.txt
new: ${{ env.TEST_FOLDER }}/filtered-results.txt
mode: deletion
tolerance: same
output: ${{ env.TEST_FOLDER }}/results.diff
token: ${{ secrets.GITHUB_TOKEN }}
title: ${{ matrix.os }}
notify_check: true
notify_issue: true
- name: upload artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: test-results-${{ steps.sha.outputs.short }}-${{ matrix.os }}
path: ${{ env.TEST_FOLDER }}/