Skip to content

Commit

Permalink
completely replace self-hosted runners
Browse files Browse the repository at this point in the history
  • Loading branch information
ikhoon committed Aug 29, 2024
1 parent af6a110 commit c202228
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 61 deletions.
34 changes: 0 additions & 34 deletions .github/check-workflow-write-permission.sh

This file was deleted.

35 changes: 9 additions & 26 deletions .github/workflows/actions_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,47 +25,32 @@ env:
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}

jobs:
choose-self-hosted:
runs-on: ubuntu-latest
outputs:
runner: ${{ steps.runner.outputs.runner }}

steps:
- id: runner
run: |
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
echo "runner=ubicloud-standard-8" >> "$GITHUB_OUTPUT"
else
echo "runner=self-hosted-safe" >> "$GITHUB_OUTPUT"
fi
build:
needs: [ choose-self-hosted ]
if: github.repository == 'line/armeria'
runs-on: ${{ matrix.on }}
timeout-minutes: 120
strategy:
fail-fast: false
matrix:
on: [ "${{ needs.choose-self-hosted.outputs.runner }}", macos-12, windows-latest ]
on: [ ubicloud-standard-8, macos-12, windows-latest ]
java: [ 21 ]
include:
- java: 8
on: ${{ needs.choose-self-hosted.outputs.runner }}
on: ubicloud-standard-8
- java: 11
on: ${{ needs.choose-self-hosted.outputs.runner }}
on: ubicloud-standard-8
- java: 17
on: ${{ needs.choose-self-hosted.outputs.runner }}
on: ubicloud-standard-8
leak: true
- java: 17
on: ${{ needs.choose-self-hosted.outputs.runner }}
on: ubicloud-standard-8
min-java: 11
- java: 17
on: ${{ needs.choose-self-hosted.outputs.runner }}
on: ubicloud-standard-8
min-java: 17
coverage: true
- java: 21
on: ${{ needs.choose-self-hosted.outputs.runner }}
on: ubicloud-standard-8
snapshot: true
# blockhound makes the build run about 10 minutes slower
blockhound: true
Expand Down Expand Up @@ -111,7 +96,7 @@ jobs:
- name: Build with Gradle (Shading only)
run: |
./gradlew --no-daemon --stacktrace shadedJar shadedTestJar trimShadedJar \
${{ startsWith(matrix.on, 'self-hosted') && '--max-workers=8' || '--max-workers=2' }} --parallel \
${{ startsWith(matrix.on, 'ubicloud') && '--max-workers=8' || '--max-workers=2' }} --parallel \
${{ matrix.coverage && '-Pcoverage' || '' }} \
-PnoLint \
-PbuildJdkVersion=${{ env.BUILD_JDK_VERSION }} \
Expand All @@ -130,7 +115,7 @@ jobs:
- name: Build with Gradle
run: |
./gradlew --no-daemon --stacktrace build \
${{ startsWith(matrix.on, 'self-hosted') && '--max-workers=8' || '--max-workers=2' }} --parallel \
${{ startsWith(matrix.on, 'ubicloud') && '--max-workers=8' || '--max-workers=2' }} --parallel \
${{ matrix.coverage && '-Pcoverage' || '' }} \
${{ matrix.leak && '-Pleak' || '' }} \
${{ matrix.blockhound && '-Pblockhound' || '' }} \
Expand Down Expand Up @@ -255,8 +240,6 @@ jobs:
site:
if: github.repository == 'line/armeria'
# ubuntu-latest is preferred for site job.
# node_modules need complicated dependencies that are difficult to install on self-hosted runners.
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
publish:
name: Publish final artifacts
if: github.repository == 'line/armeria'
runs-on: self-hosted-safe
runs-on: ubicloud-standard-8
steps:
- uses: actions/checkout@v4

Expand Down

0 comments on commit c202228

Please sign in to comment.