test macos-12 #28
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build macos all | |
on: | |
pull_request: | |
branches: | |
- main | |
workflow_dispatch: | |
workflow_call: | |
permissions: | |
contents: write | |
jobs: | |
build: | |
strategy: | |
matrix: | |
runner: ["macOS-12", "macOS-13", "macOS-14"] | |
runs-on: ${{ matrix.runner }} | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- name: Check Runner | |
run: | | |
# arch | |
# echo "runner: ${{ matrix.runner }}.$(arch).$(uname -m)" | |
# mayor version: sw_vers -productVersion | cut -d '.' -f 1 | |
# Darwin : uname -s | |
echo "suffix="$(uname -s).${{ matrix.runner }}.$(arch)"" >> $GITHUB_ENV | |
brew config | |
- name: Install Dependencies | |
run: | | |
brew install gcc@12 eigen boost libtiff # libomp llvm | |
- name: Check Dependencies | |
run: | | |
cd $(brew --prefix)/opt | |
pwd | |
alist=("zstd" "xz" "zip" "pixarg" "jpeg" "lzma" "tiff") | |
for file in "${alist[@]}"; do | |
echo "file: $file" | |
find . -name "*$file*" | |
done | |
find lib*/lib -name "*.a" | |
- name: Build | |
continue-on-error: true | |
run: | | |
cd Cell2Fire | |
make clean | |
make -f makefile.macos | |
otool -L Cell2Fire > otool_${{ env.suffix }}.txt | |
mv Cell2Fire Cell2Fire_${{ env.suffix }} | |
- name: Upload | |
uses: actions/upload-artifact@v4 | |
with: | |
name: binaries_${{ env.suffix }} | |
path: | | |
Cell2Fire/otool_${{ env.suffix }}.txt | |
Cell2Fire/Cell2Fire_${{ env.suffix }} | |
- name: Stop running | |
if: false | |
run: | | |
echo "Stop running" | |
exit 1 | |
- name: Build Static | |
continue-on-error: true | |
run: | | |
cd Cell2Fire | |
make clean | |
make -f makefile.macos-static | |
otool -L Cell2Fire > otool_${{ env.suffix }}-static.txt | |
mv Cell2Fire Cell2Fire_${{ env.suffix }}-static | |
- name: Upload Static | |
uses: actions/upload-artifact@v4 | |
with: | |
name: binaries_${{ env.suffix }}-static | |
path: | | |
Cell2Fire/otool_${{ env.suffix }}-static.txt | |
Cell2Fire/Cell2Fire_${{ env.suffix }}-static |