Skip to content

Commit

Permalink
ci(label): test E3-forcerelease
Browse files Browse the repository at this point in the history
  • Loading branch information
clearloop committed May 16, 2024
1 parent c613d1d commit 877810b
Showing 1 changed file with 42 additions and 8 deletions.
50 changes: 42 additions & 8 deletions .github/workflows/label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,37 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: Detect Profiles
id: detect-profiles
run: |
profiles='{"name": "debug", "flags": ""}'
linuxJobs='"linux (debug)", "win-cross (debug)"'
osxJobs='"macos-x86 (debug)", "macos-aarch64 (debug)"'
winJobs='"win-native (debug)"'
if [ "${{ contains(github.event.pull_request.labels.*.name, 'E3-forcerelease') }}" = "true" ];
then
profiles+=', {"name": "release", "flags": "--release"}'
linuxJobs+=', "linux (release)", "win-cross (release)"'
osxJobs+=', "macos-x86 (release)", "macos-aarch64 (release)"'
winJobs+=', "win-native (release)"'
fi
profiles="[${profiles}]"
linuxJobs="[${linuxJobs}]"
osxJobs="[${osxJobs}]"
winJobs="[${winJobs}]"
echo "profiles=${profiles}" >> "$GITHUB_OUTPUT"
echo "linuxJobs=${linuxJobs}" >> "$GITHUB_OUTPUT"
echo "osxJobs=${osxJobs}" >> "$GITHUB_OUTPUT"
echo "winJobs=${winJobs}" >> "$GITHUB_OUTPUT"
# - name: Fork Linux checks
# if: >-
# github.event.label.name == 'A0-pleasereview'
# || github.event.label.name == 'A4-insubstantial'
# || github.event.label.name == 'A2-mergeoncegreen'
# uses: gear-tech/fork-action@main
# uses: gear-tech/fork-action@cl/profiles
# with:
# token: ${{ secrets.GITHUB_TOKEN }}
# head_sha: ${{ github.event.pull_request.head.sha }}
Expand All @@ -31,31 +56,40 @@ jobs:
# workflow_id: ".github/workflows/build.yml"
# prefix: "build"
# needs: '["dynamic-profiles"]'
# jobs: '["linux (debug)", "win-cross (debug)"]'
# jobs: ${{ steps.detect-profiles.outputs.linuxJobs }}
# inputs:
# '{ "title": "${{ github.event.pull_request.title }}", "number": "${{
# github.event.number }}" }'
# '{
# "title": "${{ github.event.pull_request.title }}",
# "number": "${{ github.event.number }}",
# "release": "${{
# contains(github.event.pull_request.labels.*.name, 'E3-forcerelease')
# }}",
# "production": "${{
# contains(github.event.pull_request.labels.*.name, 'E4-forceproduction')
# }}"
# }'
#
# - name: Fork OSX checks
# if: github.event.label.name == 'E2-forcemacos'
# uses: gear-tech/fork-action@main
# uses: gear-tech/fork-action@cl/profiles
# with:
# token: ${{ secrets.GITHUB_TOKEN }}
# head_sha: ${{ github.event.pull_request.head.sha }}
# ref: ${{ github.head_ref || github.ref_name }}
# repo: "gear-tech/gear"
# workflow_id: ".github/workflows/build-macos.yml"
# prefix: "build"
# jobs: '["macos-x86 (debug)", "macos-aarch64 (debug)"]'
# jobs: ${{ steps.detect-profiles.outputs.osxJobs }}

- name: Fork Win checks
# if: github.event.label.name == 'E1-forcenatwin'
uses: gear-tech/fork-action@main
uses: gear-tech/fork-action@cl/profiles
with:
token: ${{ secrets.GITHUB_TOKEN }}
head_sha: ${{ github.event.pull_request.head.sha }}
ref: ${{ github.head_ref || github.ref_name }}
repo: "gear-tech/gear"
workflow_id: ".github/workflows/build-win-native.yml"
prefix: "build"
jobs: '["win-native (debug)"]'
jobs: ${{ steps.detect-profiles.outputs.winJobs }}
profiles: ${{ steps.detect-profiles.outputs.profiles }}

0 comments on commit 877810b

Please sign in to comment.