Build Release #806
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 Release" | |
on: | |
workflow_dispatch: | |
push: | |
branches: [master] | |
pull_request: | |
# The branches below must be a subset of the branches above | |
branches: [master] | |
schedule: | |
#- cron: '0 0 * * *' # end of each day (nightlies!) | |
- cron: '0 0 * * 0' # once a week to check if build completes | |
release: | |
types: | |
- created | |
jobs: | |
################################ | |
# Normal release version # | |
################################ | |
build_macPlugin: | |
name: Build macOS plugin binary | |
runs-on: macos-11 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@main | |
with: | |
# We must fetch at least the immediate parents so that if this is | |
# a pull request then we can checkout the head. | |
fetch-depth: 2 | |
- name: Build and run CATCH2 tests | |
run: | | |
make -C client/mumble-plugin/ CC=g++-11 test | |
- name: Build Plugin | |
run: | | |
make -C client/mumble-plugin/ plugin-macOS | |
- name: Upload plugin | |
uses: actions/upload-artifact@main | |
with: | |
name: macPlugin | |
path: client/mumble-plugin/fgcom-mumble-macOS.bundle | |
retention-days: 1 | |
build_release_package: | |
name: Build release package | |
runs-on: ubuntu-latest | |
needs: build_macPlugin | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@main | |
with: | |
# We must fetch at least the immediate parents so that if this is | |
# a pull request then we can checkout the head. | |
fetch-depth: 2 | |
- name: Setup submodules | |
run: | | |
git submodule init | |
git submodule update client/mumble-plugin/lib/openssl | |
git submodule update client/radioGUI/lib/jsimconnect | |
- name: Setup Java | |
uses: actions/setup-java@main | |
with: | |
java-version: '11' # The JDK version to make available on the path. | |
distribution: adopt | |
- name: Setup C++ | |
run: | | |
sudo apt-get install libssl-dev mingw-w64 mingw-w64-common build-essential | |
- name: Download mac plugin from job_1 | |
uses: actions/download-artifact@main | |
with: | |
name: macPlugin | |
- name: Add macPlugin to release files | |
run: | | |
cp fgcom-mumble-macOS.bundle client/mumble-plugin/ | |
- name: Build release | |
run: | | |
make clean plugin | |
make clean plugin-win64 | |
make clean plugin-win32 | |
make clean release | |
- name: Get release version | |
run: | | |
echo "PACKAGE_VERSION=$(make showVer |grep BUNDLE: |cut -d':' -f2)" >> $GITHUB_ENV | |
echo "PACKAGE_SHASHORT=$(git rev-parse --short HEAD)" >> $GITHUB_ENV | |
- name: 'Upload Artifact' | |
uses: actions/upload-artifact@main | |
with: | |
name: fgcom-mumble-${{env.PACKAGE_VERSION}}_${{env.PACKAGE_SHASHORT}} | |
path: | | |
*.zip | |
*.mumble_plugin | |
retention-days: 7 | |
############################### | |
# Debug version # | |
############################### | |
build_macPlugin-debug: | |
name: Build macOS plugin binary (debug version) | |
runs-on: macos-11 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@main | |
with: | |
# We must fetch at least the immediate parents so that if this is | |
# a pull request then we can checkout the head. | |
fetch-depth: 2 | |
- name: Build and run CATCH2 tests | |
run: | | |
make -C client/mumble-plugin/ DEBUG+="-g3 -Og -DDEBUG" CC=g++-11 test | |
- name: Build Plugin | |
run: | | |
make -C client/mumble-plugin/ DEBUG+="-g3 -Og -DDEBUG" plugin-macOS | |
- name: Upload plugin | |
uses: actions/upload-artifact@main | |
with: | |
name: macPlugin-debug | |
path: client/mumble-plugin/fgcom-mumble-macOS.bundle | |
retention-days: 1 | |
build_release_package-debug: | |
name: Build release package (debug version) | |
runs-on: ubuntu-latest | |
needs: build_macPlugin-debug | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@main | |
with: | |
# We must fetch at least the immediate parents so that if this is | |
# a pull request then we can checkout the head. | |
fetch-depth: 2 | |
- name: Setup submodules | |
run: | | |
git submodule init | |
git submodule update client/mumble-plugin/lib/openssl | |
git submodule update client/radioGUI/lib/jsimconnect | |
- name: Setup Java | |
uses: actions/setup-java@main | |
with: | |
java-version: '11' # The JDK version to make available on the path. | |
distribution: adopt | |
- name: Setup C++ | |
run: | | |
sudo apt-get install libssl-dev mingw-w64 mingw-w64-common build-essential | |
- name: Download mac plugin from job_1 | |
uses: actions/download-artifact@main | |
with: | |
name: macPlugin-debug | |
- name: Add macPlugin to release files | |
run: | | |
cp fgcom-mumble-macOS.bundle client/mumble-plugin/ | |
- name: Build release | |
run: | | |
make DEBUG+="-g3 -Og -DDEBUG" clean plugin | |
make DEBUG+="-g3 -Og -DDEBUG" clean plugin-win64 | |
make DEBUG+="-g3 -Og -DDEBUG" clean plugin-win32 | |
make DEBUG+="-g3 -Og -DDEBUG" clean release | |
- name: Get release version | |
run: | | |
echo "PACKAGE_VERSION=$(make showVer |grep BUNDLE: |cut -d':' -f2)" >> $GITHUB_ENV | |
echo "PACKAGE_SHASHORT=$(git rev-parse --short HEAD)" >> $GITHUB_ENV | |
- name: 'Upload Artifact' | |
uses: actions/upload-artifact@main | |
with: | |
name: fgcom-mumble-${{env.PACKAGE_VERSION}}_${{env.PACKAGE_SHASHORT}}-debug | |
path: | | |
*.zip | |
*.mumble_plugin | |
retention-days: 7 |