Skip to content

Commit

Permalink
fix(ci): Make sure Darwin is compiling with the correct compiler
Browse files Browse the repository at this point in the history
  • Loading branch information
RichieSams committed Oct 30, 2023
1 parent 0b0d83c commit 8bd725b
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 124 deletions.
137 changes: 74 additions & 63 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,86 +4,97 @@ on:
push:

jobs:
linux:
name: ${{ matrix.config.name }}
runs-on: ubuntu-22.04
strategy:
matrix:
config:
- name: linux_gcc_9
compiler: gcc
compiler_version: 9
- name: linux_gcc_12
compiler: gcc
compiler_version: 12
- name: linux_clang_12
compiler: clang
compiler_version: 12
- name: linux_clang_15
compiler: clang
compiler_version: 15
container:
image: quay.io/richiesams/docker_${{ matrix.config.compiler }}:${{ matrix.config.compiler_version }}
steps:
- uses: actions/checkout@v4
- name: Build Debug
run: make CMAKE_PRESET=Unix_x64_Debug generate build
- name: Build Release
run: make CMAKE_PRESET=Unix_x64_Release generate build
- name: Test
run: make test
# linux:
# name: ${{ matrix.config.name }}
# runs-on: ubuntu-22.04
# strategy:
# matrix:
# config:
# - name: linux_gcc_9
# compiler: gcc
# compiler_version: 9
# - name: linux_gcc_12
# compiler: gcc
# compiler_version: 12
# - name: linux_clang_12
# compiler: clang
# compiler_version: 12
# - name: linux_clang_15
# compiler: clang
# compiler_version: 15
# container:
# image: quay.io/richiesams/docker_${{ matrix.config.compiler }}:${{ matrix.config.compiler_version }}
# steps:
# - uses: actions/checkout@v4
# - name: Build Debug
# run: make CMAKE_PRESET=Unix_x64_Debug generate build
# - name: Build Release
# run: make CMAKE_PRESET=Unix_x64_Release generate build
# - name: Test
# run: make test
darwin:
name: ${{ matrix.config.name }}
runs-on: macOS-13
strategy:
matrix:
config:
- name: darwin_gcc_9
compiler: gcc
compiler_version: 9
brew_package: gcc@9
cc: /opt/homebrew/bin/gcc-9
cxx: /opt/homebrew/bin/g++-9
- name: darwin_gcc_12
compiler: gcc
compiler_version: 12
brew_package: gcc@12
cc: /opt/homebrew/bin/gcc-12
cxx: /opt/homebrew/bin/g++-12
- name: darwin_clang_12
compiler: clang
compiler_version: 12
brew_package: llvm@12
cc: /opt/homebrew/bin/clang-12
cxx: /opt/homebrew/bin/clang++-12
- name: darwin_clang_15
compiler: clang
compiler_version: 15
brew_package: llvm@15
cc: /opt/homebrew/bin/clang-15
cxx: /opt/homebrew/bin/clang++-15
env:
COMPILER: ${{ matrix.config.compiler }}
VERSION: ${{ matrix.config.compiler_version }}
CC: ${{ matrix.config.cc }}
CXX: ${{ matrix.config.cxx }}
steps:
- uses: actions/checkout@v4
- name: Install
run: bash ci_scripts/darwin_install_compiler.sh
run: |
brew install ${{ matrix.config.brew_package }}
brew link ${{ matrix.config.brew_package }}
- name: Temp
run: |
ls -la /usr/local/opt
ls -la /opt/homebrew
ls -la /opt/homebrew/bin
- name: Build Debug
run: make CMAKE_PRESET=Unix_x64_Debug generate build
- name: Build Release
run: make CMAKE_PRESET=Unix_x64_Release generate build
- name: Test
run: make test
windows:
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
strategy:
matrix:
config:
- name: windows_vs_2019
os: windows-2019
compiler_version: 2019
- name: windows_vs_2022
os: windows-2022
compiler_version: 2022
steps:
- uses: actions/checkout@v4
- uses: ilammy/msvc-dev-cmd@v1
with:
vsversion: "${{ matrix.compiler_version }}"
- uses: seanmiddleditch/gha-setup-ninja@master
- name: Build Debug
run: make CMAKE_PRESET=Win_x64_Debug generate build
- name: Build Release
run: make CMAKE_PRESET=Win_x64_Release generate build
- name: Test
run: make test
# windows:
# name: ${{ matrix.config.name }}
# runs-on: ${{ matrix.config.os }}
# strategy:
# matrix:
# config:
# - name: windows_vs_2019
# os: windows-2019
# compiler_version: 2019
# - name: windows_vs_2022
# os: windows-2022
# compiler_version: 2022
# steps:
# - uses: actions/checkout@v4
# - uses: ilammy/msvc-dev-cmd@v1
# with:
# vsversion: "${{ matrix.compiler_version }}"
# - uses: seanmiddleditch/gha-setup-ninja@master
# - name: Build Debug
# run: make CMAKE_PRESET=Win_x64_Debug generate build
# - name: Build Release
# run: make CMAKE_PRESET=Win_x64_Release generate build
# - name: Test
# run: make test
61 changes: 0 additions & 61 deletions ci_scripts/darwin_install_compiler.sh

This file was deleted.

0 comments on commit 8bd725b

Please sign in to comment.