forked from musescore/MuseScore
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use a single branch to avoid confusion
- Loading branch information
Showing
13 changed files
with
192 additions
and
546 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,99 +1,84 @@ | ||
name: CI_Linux | ||
name: build_Linux | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- funnel | ||
#schedule: | ||
# - cron: '0 4 */1 * *' # At 04:00 on every day-of-month | ||
schedule: | ||
- cron: '0 4 */7 * *' | ||
workflow_dispatch: | ||
inputs: | ||
build_mode: | ||
description: 'Build mode: devel_build, nightly_build, testing_build, stable_build' | ||
description: 'Build mode: devel_build, stable_build' | ||
required: true | ||
default: 'devel_build' | ||
publish: | ||
description: 'Publish to FTP: on - publish' | ||
required: false | ||
default: 'off' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-18.04 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Cancel Previous Runs | ||
uses: styfle/[email protected] | ||
with: | ||
access_token: ${{ github.token }} | ||
- name: Clone repository | ||
uses: actions/checkout@v2 | ||
- name: "Configure workflow" | ||
run: | | ||
sudo bash ./build/ci/tools/make_build_mode_env.sh -e ${{ github.event_name }} -m ${{ github.event.inputs.build_mode }} | ||
BUILD_MODE=$(cat ./build.artifacts/env/build_mode.env) | ||
DO_BUILD='true' | ||
DO_PUBLISH='false' | ||
if [[ "${{ github.event.inputs.publish }}" == "on" || "$BUILD_MODE" == "nightly_build" ]]; then | ||
DO_PUBLISH='true' | ||
if [ -z "${{ secrets.OSUOSL_SSH_ENCRYPT_SECRET }}" ]; then | ||
echo "warning: not set OSUOSL_SSH_ENCRYPT_SECRET, publish disabled" | ||
DO_PUBLISH='false' | ||
fi | ||
fi | ||
echo "BUILD_MODE=$BUILD_MODE" >> $GITHUB_ENV | ||
echo "BUILD_MODE: $BUILD_MODE" | ||
echo "DO_BUILD=$DO_BUILD" >> $GITHUB_ENV | ||
echo "DO_BUILD: $DO_BUILD" | ||
echo "DO_PUBLISH=$DO_PUBLISH" >> $GITHUB_ENV | ||
echo "DO_PUBLISH: $DO_PUBLISH" | ||
- name: Setup environment | ||
if: env.DO_BUILD == 'true' | ||
- name: Clone repo master | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: master | ||
path: m | ||
- name: Setup | ||
run: | | ||
sudo bash ./build/ci/linux/setup.sh | ||
ls -ltr | ||
cd m | ||
ls -ltr | ||
./build/ci/linux/setup.sh | ||
- name: Build | ||
if: env.DO_BUILD == 'true' | ||
run: | | ||
T_ID=${{ secrets.TELEMETRY_TRACK_ID }}; if [ -z "$T_ID" ]; then T_ID="''"; fi | ||
sudo bash ./build/ci/linux/build.sh -n ${{ github.run_id }} --telemetry $T_ID | ||
- name: Package | ||
if: env.DO_BUILD == 'true' | ||
run: | | ||
sudo bash ./build/ci/linux/package.sh | ||
- name: Checksum | ||
if: env.DO_BUILD == 'true' | ||
run: | | ||
sudo bash ./build/ci/tools/checksum.sh | ||
- name: Publish package | ||
if: env.DO_PUBLISH == 'true' | ||
cd m | ||
./build/ci/linux/build.sh | ||
- name: Package | ||
run: | | ||
sudo bash ./build/ci/tools/osuosl/publish.sh -s ${{ secrets.OSUOSL_SSH_ENCRYPT_SECRET }} --os linux -v 3 | ||
- name: Upload artifacts on GitHub | ||
if: env.DO_BUILD == 'true' | ||
uses: actions/upload-artifact@v2 | ||
cd m | ||
./build/ci/linux/package.sh | ||
- name: Artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: MuseScore_${{ github.run_id }} | ||
path: ./build.artifacts/ | ||
|
||
run_mtests: | ||
runs-on: ubuntu-18.04 | ||
env: | ||
# Enable AddressSanitizer in the mtest build | ||
CFLAGS: "-fsanitize=address -fno-omit-frame-pointer" | ||
CXXFLAGS: "-fsanitize=address -fno-omit-frame-pointer" | ||
name: linux-musescore3 | ||
path: m/musescore3.tar.xz | ||
- name: version | ||
run: echo "::set-output name=version::$(date +%Y%m%d)" | ||
id: version | ||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: release-linux-${{ steps.version.outputs.version }} | ||
release_name: linux-${{ steps.version.outputs.version }} | ||
draft: false | ||
prerelease: false | ||
- name: Upload Release Asset | ||
id: upload-release-asset | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps | ||
asset_path: ./m/musescore3.tar.xz | ||
asset_name: musescore3.tar.xz | ||
asset_content_type: application/zip | ||
upload-weekly: | ||
permissions: | ||
contents: write | ||
needs: | ||
- build | ||
if: github.ref == 'refs/heads/master' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Clone repository | ||
uses: actions/checkout@v2 | ||
- name: Setup environment | ||
run: | | ||
sudo bash ./build/ci/linux/setup.sh | ||
- name: Build | ||
run: | | ||
mkdir -p build.artifacts/env | ||
./build/ci/linux/build.sh -n ${{ github.run_id }} --build_mode mtests | ||
- name: Run mtests | ||
run: | | ||
./build/ci/linux/runmtests.sh | ||
- uses: actions/download-artifact@v2 | ||
with: | ||
name: linux-musescore3 | ||
- name: Upload musescore release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
shell: bash | ||
run: | | ||
gh release upload weekly-linux musescore3* --clobber -R ${{ github.repository }} |
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
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
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
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
Oops, something went wrong.