CHG gradle version #705
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: Nightly build MacOS | |
on: | |
push: | |
tags: | |
- 'Nightly' | |
jobs: | |
set-revision: | |
name: set revision | |
runs-on: ubuntu-20.04 | |
outputs: | |
output1: ${{ steps.out1.outputs.revision }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: detect revision | |
run: | | |
read text < ./src/simutrans/revision.h | |
revision=${text:17:5} | |
echo "revision=$revision" >> $GITHUB_ENV | |
- id: out1 | |
run: echo "revision=$revision" >> $GITHUB_OUTPUT | |
sim-mac-sdl2: | |
name: macOS (SDL2) | |
runs-on: macos-12 | |
needs: [set-revision] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Get Dependencies | |
run: | | |
brew reinstall cmake pkg-config libpng freetype zstd sdl2 fluidsynth | |
- name: Build | |
run: | | |
mkdir build | |
cd build | |
cmake -DCMAKE_BUILD_TYPE=Release .. | |
cp ../revision.h ./revision.h | |
cmake --build . --target install | |
- name: Build Zip | |
run: | | |
cd build | |
zip -r simumac_x86-nightly.zip simutrans | |
- name: Upload Artifact (CI) | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: build/simumac_x86-nightly.zip | |
asset_name: simumac_x86-nightly_r${{ needs.set-revision.outputs.output1 }}.zip | |
#name: ${{ github.job }}-nightly | |
#path: | |
tag: Nightly | |
overwrite: true | |
sim-mac-arm: | |
name: macOS (ARM) | |
runs-on: macos-latest | |
needs: [set-revision] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: install_dependencies | |
run: | | |
brew reinstall cmake pkg-config libpng freetype zstd sdl2 fluidsynth | |
- name: build | |
run: | | |
mkdir build | |
cd build | |
cmake -DCMAKE_BUILD_TYPE=Release .. | |
cp ../revision.h ./revision.h | |
cmake --build . --target install | |
- name: distribute | |
run: | | |
cd build | |
zip -r simumac-arm-nightly.zip simutrans | |
- name: Update binaries of Nightly Release | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: build/simumac-arm-nightly.zip | |
asset_name: simumac-arm-nightly_r${{ needs.set-revision.outputs.output1 }}.zip | |
tag: Nightly | |
overwrite: true | |
makeobj-mac_x86: | |
name: macOS Makeobj | |
runs-on: macos-12 | |
needs: [set-revision] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Configure | |
run: cp configs/config.makeobj-mac config.default | |
- name: Build | |
run: make -j2 makeobj | |
- name: zip result | |
run: zip -r -9 makeobj_macos-nightly.zip build/default/makeobj/makeobj | |
- name: Upload Artifact (CI) | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: makeobj_macos-nightly.zip | |
asset_name: makeobj_macos-x86-nightly_r${{ needs.set-revision.outputs.output1 }}.zip | |
#name: ${{ github.job }}-nightly | |
#path: build/default/makeobj/makeobj | |
tag: Nightly | |
overwrite: true | |
makeobj-mac_arm: | |
name: makeobj macOS arm | |
runs-on: macos-latest | |
needs: [set-revision] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: install_dependencies | |
run: | | |
brew reinstall cmake pkg-config libpng | |
- name: build | |
run: | | |
printf "#define REVISION %i\n" $(tools/get_revision.sh) > src/simutrans/revision.h | |
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release | |
cp ./revision.h ./build/revision.h | |
cmake --build build/src/makeobj | |
- name: distribute | |
run: | | |
cd build/src/makeobj | |
zip -r makeobj-arm-nightly.zip makeobj | |
- name: Update binaries of Nightly Release | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: build/src/makeobj/makeobj-arm-nightly.zip | |
asset_name: makeobj_macos-arm-nightly_r${{ needs.set-revision.outputs.output1 }}.zip | |
tag: Nightly | |
overwrite: true | |
nettool-mac: | |
name: macOS Nettool | |
runs-on: macos-12 | |
needs: [set-revision] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Configure | |
run: cp configs/config.${{ github.job }} config.default | |
- name: Build | |
run: make -j2 nettool | |
- name: zip result | |
run: zip -r -9 nettool_mac-nightly.zip build/default/nettool/nettool | |
- name: Upload Artifact (CI) | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: nettool_mac-nightly.zip | |
asset_name: nettool_mac-x86-nightly_r${{ needs.set-revision.outputs.output1 }}.zip | |
#name: ${{ github.job }}-nightly | |
#path: build/default/nettool/nettool | |
tag: Nightly | |
overwrite: true |