v0.20 (#237) #64
This file contains hidden or 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: Binaries | |
| on: | |
| push: | |
| branches: [ main ] | |
| jobs: | |
| cpu_linux_build: | |
| name: Linux | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| with: | |
| submodules: recursive | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| uuid-dev \ | |
| build-essential | |
| - name: Build QuESTlink | |
| run: make OS=LINUX compiler=g++ COMPILER_TYPE=GNU EXE=linux_quest_link | |
| - name: Prepare to upload binary | |
| run: | | |
| mkdir -p Binaries/linux | |
| mv linux_quest_link Binaries/linux/. | |
| - uses: actions/upload-artifact@v1 | |
| with: | |
| name: linux_quest_link | |
| path: Binaries/linux | |
| cpu_macos_x86_build: | |
| name: MacOS_x86 | |
| runs-on: macos-15-intel | |
| steps: | |
| - uses: actions/checkout@v2 | |
| with: | |
| submodules: recursive | |
| - name: Build QuESTlink | |
| run: make OS=MACOS compiler=clang COMPILER_TYPE=CLANG MACOS_ARCH=x64 EXE=macos_x86_quest_link | |
| - name: Prepare to upload binary | |
| run: | | |
| mkdir -p Binaries/macos_x86 | |
| mv macos_x86_quest_link Binaries/macos_x86/. | |
| - uses: actions/upload-artifact@v1 | |
| with: | |
| name: macos_x86_quest_link | |
| path: Binaries/macos_x86 | |
| cpu_macos_arm_build: | |
| name: MacOS_ARM | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| with: | |
| submodules: recursive | |
| - name: Build QuESTlink | |
| run: make OS=MACOS compiler=clang COMPILER_TYPE=CLANG MACOS_ARCH=ARM EXE=macos_arm_quest_link | |
| - name: Prepare to upload binary | |
| run: | | |
| mkdir -p Binaries/macos_arm | |
| mv macos_arm_quest_link Binaries/macos_arm/. | |
| - uses: actions/upload-artifact@v1 | |
| with: | |
| name: macos_arm_quest_link | |
| path: Binaries/macos_arm | |
| cpu_windows_build: | |
| name: Windows | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| with: | |
| submodules: recursive | |
| - uses: ilammy/msvc-dev-cmd@v1 | |
| - name: Build QuESTlink | |
| shell: cmd | |
| run: make OS=WINDOWS COMPILER=cl COMPILER_TYPE=MSVC WINDOWS_ARCH=64 EXE=windows_quest_link | |
| - name: Prepare to upload binary | |
| shell: cmd | |
| run: | | |
| if not exist Binaries mkdir Binaries | |
| if not exist Binaries\windows mkdir Binaries\windows | |
| move windows_quest_link.exe Binaries\windows | |
| - uses: actions/upload-artifact@v1 | |
| with: | |
| name: windows_quest_link | |
| path: Binaries/windows | |
| publish_binaries: | |
| name: Publish binaries | |
| needs: [cpu_linux_build, cpu_macos_x86_build, cpu_macos_arm_build, cpu_windows_build] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| with: | |
| ref: main | |
| - name: Prepare binaries directory | |
| run: | | |
| rm -rf Binaries | |
| mkdir Binaries | |
| - uses: actions/download-artifact@v3 | |
| with: | |
| name: linux_quest_link | |
| path: Binaries | |
| - uses: actions/download-artifact@v3 | |
| with: | |
| name: macos_x86_quest_link | |
| path: Binaries | |
| - uses: actions/download-artifact@v3 | |
| with: | |
| name: macos_arm_quest_link | |
| path: Binaries | |
| - uses: actions/download-artifact@v3 | |
| with: | |
| name: windows_quest_link | |
| path: Binaries | |
| - name: Commit recompiled binaries | |
| run: | | |
| git config --local user.email "action@github.com" | |
| git config --local user.name "GitHub Action" | |
| git add Binaries | |
| git commit -m "Update precompiled binaries" | |
| - name: Push recompiled binaries | |
| uses: ad-m/github-push-action@v0.8.0 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| branch: main |