Skip to content

Commit

Permalink
chore: reduce target os number
Browse files Browse the repository at this point in the history
  • Loading branch information
evenyag committed May 16, 2024
1 parent 7da9012 commit 44ce00c
Showing 1 changed file with 51 additions and 61 deletions.
112 changes: 51 additions & 61 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
- "v*.*.*"
schedule:
# At 00:00 on Monday.
- cron: '0 0 * * 1'
- cron: "0 0 * * 1"
workflow_dispatch: # Allows you to run this workflow manually.
# Notes: The GitHub Actions ONLY support 10 inputs, and it's already used up.
inputs:
Expand Down Expand Up @@ -163,9 +163,7 @@ jobs:
build-linux-amd64-artifacts:
name: Build linux-amd64 artifacts
if: ${{ inputs.build_linux_amd64_artifacts || github.event_name == 'push' || github.event_name == 'schedule' }}
needs: [
allocate-runners,
]
needs: [allocate-runners]
runs-on: ${{ needs.allocate-runners.outputs.linux-amd64-runner }}
steps:
- uses: actions/checkout@v4
Expand All @@ -182,9 +180,7 @@ jobs:
build-linux-arm64-artifacts:
name: Build linux-arm64 artifacts
if: ${{ inputs.build_linux_arm64_artifacts || github.event_name == 'push' || github.event_name == 'schedule' }}
needs: [
allocate-runners,
]
needs: [allocate-runners]
runs-on: ${{ needs.allocate-runners.outputs.linux-arm64-runner }}
steps:
- uses: actions/checkout@v4
Expand All @@ -208,24 +204,22 @@ jobs:
arch: aarch64-apple-darwin
features: servers/dashboard
artifacts-dir-prefix: greptime-darwin-arm64
- os: ${{ needs.allocate-runners.outputs.macos-runner }}
arch: aarch64-apple-darwin
features: pyo3_backend,servers/dashboard
artifacts-dir-prefix: greptime-darwin-arm64-pyo3
- os: ${{ needs.allocate-runners.outputs.macos-runner }}
features: servers/dashboard
arch: x86_64-apple-darwin
artifacts-dir-prefix: greptime-darwin-amd64
- os: ${{ needs.allocate-runners.outputs.macos-runner }}
features: pyo3_backend,servers/dashboard
arch: x86_64-apple-darwin
artifacts-dir-prefix: greptime-darwin-amd64-pyo3
# - os: ${{ needs.allocate-runners.outputs.macos-runner }}
# arch: aarch64-apple-darwin
# features: pyo3_backend,servers/dashboard
# artifacts-dir-prefix: greptime-darwin-arm64-pyo3
# - os: ${{ needs.allocate-runners.outputs.macos-runner }}
# features: servers/dashboard
# arch: x86_64-apple-darwin
# artifacts-dir-prefix: greptime-darwin-amd64
# - os: ${{ needs.allocate-runners.outputs.macos-runner }}
# features: pyo3_backend,servers/dashboard
# arch: x86_64-apple-darwin
# artifacts-dir-prefix: greptime-darwin-amd64-pyo3
runs-on: ${{ matrix.os }}
outputs:
build-macos-result: ${{ steps.set-build-macos-result.outputs.build-macos-result }}
needs: [
allocate-runners,
]
needs: [allocate-runners]
if: ${{ inputs.build_macos_artifacts || github.event_name == 'push' || github.event_name == 'schedule' }}
steps:
- uses: actions/checkout@v4
Expand All @@ -245,7 +239,7 @@ jobs:
- name: Set build macos result
id: set-build-macos-result
run: |
echo "build-macos-result=success" >> $GITHUB_OUTPUT
echo "build-macos-result=success" >> $GITHUB_OUTPUT
build-windows-artifacts:
name: Build Windows artifacts
Expand All @@ -264,9 +258,7 @@ jobs:
runs-on: ${{ matrix.os }}
outputs:
build-windows-result: ${{ steps.set-build-windows-result.outputs.build-windows-result }}
needs: [
allocate-runners,
]
needs: [allocate-runners]
if: ${{ inputs.build_windows_artifacts || github.event_name == 'push' || github.event_name == 'schedule' }}
steps:
- run: git config --global core.autocrlf false
Expand All @@ -293,11 +285,12 @@ jobs:
release-images-to-dockerhub:
name: Build and push images to DockerHub
if: ${{ inputs.release_images || github.event_name == 'push' || github.event_name == 'schedule' }}
needs: [
allocate-runners,
build-linux-amd64-artifacts,
build-linux-arm64-artifacts,
]
needs:
[
allocate-runners,
build-linux-amd64-artifacts,
build-linux-arm64-artifacts,
]
runs-on: ubuntu-2004-16-cores
outputs:
build-image-result: ${{ steps.set-build-image-result.outputs.build-image-result }}
Expand All @@ -318,19 +311,20 @@ jobs:
- name: Set build image result
id: set-build-image-result
run: |
echo "build-image-result=success" >> $GITHUB_OUTPUT
echo "build-image-result=success" >> $GITHUB_OUTPUT
release-cn-artifacts:
name: Release artifacts to CN region
if: ${{ inputs.release_images || github.event_name == 'push' || github.event_name == 'schedule' }}
needs: [ # The job have to wait for all the artifacts are built.
allocate-runners,
build-linux-amd64-artifacts,
build-linux-arm64-artifacts,
build-macos-artifacts,
build-windows-artifacts,
release-images-to-dockerhub,
]
needs: # The job have to wait for all the artifacts are built.
[
allocate-runners,
build-linux-amd64-artifacts,
build-linux-arm64-artifacts,
build-macos-artifacts,
build-windows-artifacts,
release-images-to-dockerhub,
]
runs-on: ubuntu-20.04
# When we push to ACR, it's easy to fail due to some unknown network issues.
# However, we don't want to fail the whole workflow because of this.
Expand Down Expand Up @@ -363,14 +357,15 @@ jobs:
publish-github-release:
name: Create GitHub release and upload artifacts
if: ${{ inputs.publish_github_release || github.event_name == 'push' || github.event_name == 'schedule' }}
needs: [ # The job have to wait for all the artifacts are built.
allocate-runners,
build-linux-amd64-artifacts,
build-linux-arm64-artifacts,
build-macos-artifacts,
build-windows-artifacts,
release-images-to-dockerhub,
]
needs: # The job have to wait for all the artifacts are built.
[
allocate-runners,
build-linux-amd64-artifacts,
build-linux-arm64-artifacts,
build-macos-artifacts,
build-windows-artifacts,
release-images-to-dockerhub,
]
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
Expand All @@ -390,10 +385,7 @@ jobs:
# Only run this job when the runner is allocated.
if: ${{ always() }}
runs-on: ubuntu-20.04
needs: [
allocate-runners,
build-linux-amd64-artifacts,
]
needs: [allocate-runners, build-linux-amd64-artifacts]
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -415,10 +407,7 @@ jobs:
# Only run this job when the runner is allocated.
if: ${{ always() }}
runs-on: ubuntu-20.04
needs: [
allocate-runners,
build-linux-arm64-artifacts,
]
needs: [allocate-runners, build-linux-arm64-artifacts]
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -438,11 +427,12 @@ jobs:
notification:
if: ${{ always() || github.repository == 'GreptimeTeam/greptimedb' }}
name: Send notification to Greptime team
needs: [
release-images-to-dockerhub,
build-macos-artifacts,
build-windows-artifacts,
]
needs:
[
release-images-to-dockerhub,
build-macos-artifacts,
build-windows-artifacts,
]
runs-on: ubuntu-20.04
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_DEVELOP_CHANNEL }}
Expand Down

0 comments on commit 44ce00c

Please sign in to comment.