Skip to content

Update GCC version in macOS build workflow #36

Update GCC version in macOS build workflow

Update GCC version in macOS build workflow #36

name: Build MacOS for ARM processor
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
types: [synchronize, opened, reopened, ready_for_review]
workflow_dispatch:
concurrency:
group: build-MacOS-ARM${{ github.head_ref }}
cancel-in-progress: true
jobs:
build:
if: github.event.pull_request.draft == false
runs-on: macos-15
steps:
- uses: actions/checkout@v2
- name: Install depends
run: |
brew install flex bison
curl -L https://github.com/Kitware/CMake/releases/download/v3.31.8/cmake-3.31.8-macos-universal.tar.gz -o cmake.tar.gz
tar -xzf cmake.tar.gz
sudo mv cmake-3.31.8-macos-universal/CMake.app/Contents/bin/* /usr/local/bin/
sudo cp -r cmake-3.31.8-macos-universal/CMake.app/Contents/share /usr/local/
cmake --version
- name: Prebuild
run: |
mkdir build && cd build
CC=gcc-13 CXX=g++-13 cmake ../ -DCMAKE_BUILD_TYPE=Prebuild -DBISON_EXECUTABLE=/opt/homebrew/opt/bison/bin/bison -DFLEX_EXECUTABLE=/opt/homebrew/opt/flex/bin/flex
make
- name: Build
run: |
cd build
CC=gcc-13 CXX=g++-13 cmake ../ -DCMAKE_BUILD_TYPE=Release -DBISON_EXECUTABLE=/opt/homebrew/opt/bison/bin/bison -DFLEX_EXECUTABLE=/opt/homebrew/opt/flex/bin/flex
make
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: verifytapn-arm64
path: '${{runner.workspace}}/verifytapn/build/verifytapn/bin/verifytapn-osx64'