mirror of
https://github.com/kevinbentley/Descent3.git
synced 2025-01-22 11:28:56 +00:00
Specify shell per runner
This commit is contained in:
parent
c7f48142c6
commit
dc8aff0b50
33
.github/workflows/build.yml
vendored
33
.github/workflows/build.yml
vendored
@ -24,38 +24,44 @@ jobs:
|
||||
cc: cl
|
||||
cxx: cl
|
||||
name: Windows-x64
|
||||
shell: ''
|
||||
- runner: macos-14
|
||||
preset: mac
|
||||
cc: cc
|
||||
cxx: c++
|
||||
name: macOS-Intel
|
||||
shell: arch -x86_64 /bin/bash -e {0}
|
||||
- runner: macos-14
|
||||
preset: mac
|
||||
cc: cc
|
||||
cxx: c++
|
||||
name: macOS-ARM
|
||||
shell: ''
|
||||
- runner: ubuntu-latest
|
||||
preset: linux
|
||||
cc: gcc
|
||||
cxx: g++
|
||||
name: Linux-x64
|
||||
shell: ''
|
||||
- runner: ubuntu-latest
|
||||
preset: linux
|
||||
cc: clang
|
||||
cxx: clang++
|
||||
name: Linux-x64-clang
|
||||
shell: ''
|
||||
- runner: ubuntu-latest
|
||||
preset: linux-cross-arm64
|
||||
cc: gcc
|
||||
cxx: g++++
|
||||
name: Linux-cross-arm64
|
||||
shell: ''
|
||||
build_type:
|
||||
- Debug
|
||||
- Release
|
||||
|
||||
runs-on: ${{ matrix.os.runner }}
|
||||
env:
|
||||
MACOS_ARCH_COMMAND: '' # default to nothing
|
||||
# env:
|
||||
# MACOS_ARCH_COMMAND: '' # default to nothing
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
@ -66,11 +72,11 @@ jobs:
|
||||
if: ${{ matrix.os.name == 'macOS-Intel' }}
|
||||
run: |
|
||||
/usr/sbin/softwareupdate --install-rosetta --agree-to-license
|
||||
echo "MACOS_ARCH_COMMAND=arch -x86_64" >> $GITHUB_ENV
|
||||
# echo "MACOS_ARCH_COMMAND=arch -x86_64" >> $GITHUB_ENV
|
||||
|
||||
- name: Install Intel version of Brew
|
||||
if: ${{ matrix.os.name == 'macOS-Intel' }}
|
||||
shell: arch -x86_64 /bin/bash -e {0}
|
||||
shell: ${{ matrix.os.shell }}
|
||||
run: |
|
||||
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
||||
|
||||
@ -80,16 +86,11 @@ jobs:
|
||||
|
||||
- name: Install macOS Intel dependencies
|
||||
if: ${{ matrix.os.preset == 'mac' && matrix.os.name == 'macOS-Intel' }}
|
||||
shell: arch -x86_64 /bin/bash -e {0}
|
||||
shell: ${{ matrix.os.shell }}
|
||||
run: |
|
||||
which brew
|
||||
echo $PATH
|
||||
eval "$(/usr/local/bin/brew shellenv)"
|
||||
which brew
|
||||
echo $PATH
|
||||
echo "PATH=$PATH" >> $GITHUB_ENV # modify $PATH for future steps so the Intel Brew and its installs are enshrined as the default
|
||||
brew bundle install
|
||||
file /usr/local/bin/cmake
|
||||
|
||||
- name: Install Linux dependencies
|
||||
if: ${{ matrix.os.runner == 'ubuntu-latest' }}
|
||||
@ -126,21 +127,25 @@ jobs:
|
||||
|
||||
- name: Configure CMake
|
||||
if: ${{ matrix.os.preset != 'linux-cross-arm64' }}
|
||||
shell: ${{ matrix.os.shell }}
|
||||
env:
|
||||
CC: ${{ matrix.os.cc }}
|
||||
CXX: ${{ matrix.os.cxx }}
|
||||
run: $MACOS_ARCH_COMMAND cmake --preset ${{ matrix.os.preset }} -DBUILD_TESTING=ON -DENABLE_LOGGER=ON -DFORCE_PORTABLE_INSTALL=ON -DBUILD_EDITOR=ON -DUSE_EXTERNAL_PLOG=ON
|
||||
run: cmake --preset ${{ matrix.os.preset }} -DBUILD_TESTING=ON -DENABLE_LOGGER=ON -DFORCE_PORTABLE_INSTALL=ON -DBUILD_EDITOR=ON -DUSE_EXTERNAL_PLOG=ON
|
||||
|
||||
- name: Build ${{ matrix.build_type }}
|
||||
run: $MACOS_ARCH_COMMAND cmake --build --preset ${{ matrix.os.preset }} --config ${{ matrix.build_type }} --verbose
|
||||
shell: ${{ matrix.os.shell }}
|
||||
run: cmake --build --preset ${{ matrix.os.preset }} --config ${{ matrix.build_type }} --verbose
|
||||
|
||||
- name: Run ${{ matrix.build_type }} Unittests
|
||||
if: ${{ matrix.os.preset != 'linux-cross-arm64' }}
|
||||
run: $MACOS_ARCH_COMMAND ctest --preset ${{ matrix.os.preset }} -C ${{ matrix.build_type }}
|
||||
shell: ${{ matrix.os.shell }}
|
||||
run: ctest --preset ${{ matrix.os.preset }} -C ${{ matrix.build_type }}
|
||||
|
||||
- name: Local install
|
||||
shell: ${{ matrix.os.shell }}
|
||||
# There no cmake install presets so install in traditional way
|
||||
run: $MACOS_ARCH_COMMAND cmake --install builds/${{ matrix.os.preset }}/ --config ${{ matrix.build_type }}
|
||||
run: cmake --install builds/${{ matrix.os.preset }}/ --config ${{ matrix.build_type }}
|
||||
|
||||
- name: Upload Artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
|
Loading…
Reference in New Issue
Block a user