Skip to content

Update Docker image #1101

Update Docker image

Update Docker image #1101

Workflow file for this run

name: "MacOS"
on:
push:
paths-ignore:
- 'msvc*/**'
- 'check/**'
- 'doc/**'
- 'packaging/**'
- 'snap/**'
- '*.md'
- 'check/**'
- 'default/**'
- 'test-scripting/**'
pull_request:
paths-ignore:
- 'msvc*/**'
- 'check/**'
- 'doc/**'
- 'packaging/**'
- 'snap/**'
- '*.md'
- 'check/**'
- 'default/**'
- 'test-scripting/**'
jobs:
build-macos:
name: ${{ matrix.os }} Build FreeOrion
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-11, macos-12]
env:
CACHE_NAME: macos-full
CMAKE_BUILD_PARALLEL_LEVEL: 2
HOMEBREW_NO_AUTO_UPDATE: 1
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Clean up Mono
run: sudo ./.github/workflows/mono-uninstall.sh
- name: Prepare ccache timestamp
id: build-macos-ccache-timestamp
shell: cmake -P {0}
run: |
string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC)
file(APPEND "$ENV{GITHUB_OUTPUT}" "timestamp=${current_date}")
- name: Cache compilation
uses: actions/cache@v3
with:
path: ~/Library/Caches/
key: build-${{ matrix.os }}-ccache-${{ steps.build-macos-ccache-timestamp.outputs.timestamp }}
restore-keys: |
build-${{ matrix.os }}-ccache-
- name: Show ccache statistics before build
run: |
export PATH="/usr/local/opt/ccache/libexec:$PATH"
brew install ccache
ccache --show-stats || true
- name: Configure
run: |
export PATH="/usr/local/opt/ccache/libexec:$PATH"
ccache --set-config=max_size=500M --set-config=sloppiness=file_macro
ccache --zero-stats
mkdir build
cd build
alias cmake="/usr/local/bin/gtimeout 40m /usr/local/bin/cmake"
cmake -GXcode -DBUILD_TESTING=ON -DBUILD_CLIENT_GODOT=ON -DBoost_NO_BOOST_CMAKE=ON -DGLEW_USE_STATIC_LIBS=ON ..
- name: Build
run: |
export PATH="/usr/local/opt/ccache/libexec:$PATH"
alias cmake="/usr/local/bin/gtimeout 40m /usr/local/bin/cmake"
cd build
cmake --build . --config Release -- -parallelizeTargets
- name: Generate binaries
run: |
export PATH="/usr/local/opt/ccache/libexec:$PATH"
alias cmake="/usr/local/bin/gtimeout 40m /usr/local/bin/cmake"
cd build
cmake --build . --config Release --target package -- -parallelizeTargets
ccache --cleanup
ccache --show-stats || true
- name: Decrypt deploy SSH key
if: github.ref == 'refs/heads/weekly-test-builds' && github.event_name == 'push' && matrix.os == 'macos-11'
run: bash .github/pre-deploy.sh
env:
DEPLOY_SSH_PASSWORD: ${{ secrets.DEPLOY_SSH_PASSWORD }}
- name: Upload binaries only
if: github.ref == 'refs/heads/weekly-test-builds' && github.event_name == 'push' && matrix.os == 'macos-11'
run: bash -c 'scp build/FreeOrion_*_Test_MacOSX_10.12.dmg [email protected]:/home/frs/project/freeorion/FreeOrion/Test/'