Skip to content

Commit

Permalink
try outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
pablohoch committed Mar 5, 2024
1 parent 2dfacca commit 7ce053e
Showing 1 changed file with 30 additions and 19 deletions.
49 changes: 30 additions & 19 deletions .github/workflows/unix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,15 @@ env:
GCC_VERSION: 12

jobs:
env-vars:
name: Get environment variables
runs-on: ubuntu-latest
outputs:
LLVM_VERSION: ${{ env.LLVM_VERSION }}
GCC_VERSION: ${{ env.GCC_VERSION }}
steps:
- run: echo "🤡 GitHub 🤡"

formatting:
runs-on: ubuntu-latest
steps:
Expand All @@ -26,11 +35,11 @@ jobs:
- name: Install clang-format
uses: ./.github/actions/install-llvm
with:
version: ${{ vars.LLVM_VERSION }}
packages: clang-format-${{ vars.LLVM_VERSION }}
version: ${{ env.LLVM_VERSION }}
packages: clang-format-${{ env.LLVM_VERSION }}

- name: Format files
run: find src include -type f -a \( -name "*.cc" -o -name "*.h" \) -print0 | xargs -0 clang-format-${{ vars.LLVM_VERSION }} -i
run: find src include -type f -a \( -name "*.cc" -o -name "*.h" \) -print0 | xargs -0 clang-format-${{ env.LLVM_VERSION }} -i

- name: Check for differences
run: |
Expand All @@ -39,6 +48,8 @@ jobs:
build:
runs-on: ${{ matrix.config.os }}
needs:
- env-vars
strategy:
fail-fast: false
matrix:
Expand All @@ -59,39 +70,39 @@ jobs:
cxxflags: -stdlib=libc++
os: macos-14
artifact: macos-arm64
- name: GCC ${{ vars.GCC_VERSION }} Release
cxx: g++-${{ vars.GCC_VERSION }}
cc: gcc-${{ vars.GCC_VERSION }}
- name: GCC ${{ needs.env-vars.outputs.GCC_VERSION }} Release
cxx: g++-${{ needs.env-vars.outputs.GCC_VERSION }}
cc: gcc-${{ needs.env-vars.outputs.GCC_VERSION }}
mode: Release
mimalloc: on
os: ubuntu-latest
artifact: linux
- name: GCC ${{ vars.GCC_VERSION }} Debug
cxx: g++-${{ vars.GCC_VERSION }}
cc: gcc-${{ vars.GCC_VERSION }}
- name: GCC ${{ needs.env-vars.outputs.GCC_VERSION }} Debug
cxx: g++-${{ needs.env-vars.outputs.GCC_VERSION }}
cc: gcc-${{ needs.env-vars.outputs.GCC_VERSION }}
mode: Debug
mimalloc: on
os: ubuntu-latest
- name: Clang ${{ vars.LLVM_VERSION }} Release
cxx: clang++-${{ vars.LLVM_VERSION }}
cc: clang-${{ vars.LLVM_VERSION }}
- name: Clang ${{ needs.env-vars.outputs.LLVM_VERSION }} Release
cxx: clang++-${{ needs.env-vars.outputs.LLVM_VERSION }}
cc: clang-${{ needs.env-vars.outputs.LLVM_VERSION }}
mode: Release
mimalloc: on
cxxflags: -stdlib=libc++
ldflags: -lc++abi
os: ubuntu-latest
- name: Clang Tidy
cxx: clang++-${{ vars.LLVM_VERSION }}
cc: clang-${{ vars.LLVM_VERSION }}
cxx: clang++-${{ needs.env-vars.outputs.LLVM_VERSION }}
cc: clang-${{ needs.env-vars.outputs.LLVM_VERSION }}
mode: Release
mimalloc: on
cxxflags: -stdlib=libc++
ldflags: -lc++abi
lint: true
os: ubuntu-latest
- key: Clang ${{ vars.LLVM_VERSION }} Sanitizer
cxx: clang++-${{ vars.LLVM_VERSION }}
cc: clang-${{ vars.LLVM_VERSION }}
- key: Clang ${{ needs.env-vars.outputs.LLVM_VERSION }} Sanitizer
cxx: clang++-${{ needs.env-vars.outputs.LLVM_VERSION }}
cc: clang-${{ needs.env-vars.outputs.LLVM_VERSION }}
mode: Release
mimalloc: on
cflags: -fsanitize=address,undefined -fno-omit-frame-pointer
Expand Down Expand Up @@ -120,7 +131,7 @@ jobs:
if: ${{ !startsWith(matrix.config.os, 'macos-') && startsWith(matrix.config.cc, 'clang') }}
uses: ./.github/actions/install-llvm
with:
version: ${{ vars.LLVM_VERSION }}
version: ${{ env.LLVM_VERSION }}

- name: Install ninja (Ubuntu)
if: ${{ !startsWith(matrix.config.os, 'macos-') }}
Expand All @@ -133,7 +144,7 @@ jobs:
run: brew install ninja

- name: Install Valgrind
if: ${{ matrix.config.mode == 'Debug' && matrix.config.cc == 'gcc-${{ vars.GCC_VERSION }}' }}
if: ${{ matrix.config.mode == 'Debug' && matrix.config.cc == 'gcc-${{ env.GCC_VERSION }}' }}
env:
DEBIAN_FRONTEND: noninteractive
run: sudo apt-get install -y --no-install-recommends valgrind
Expand Down

0 comments on commit 7ce053e

Please sign in to comment.