-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
64c85cd
commit f9c6c15
Showing
2 changed files
with
39 additions
and
186 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
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 |
---|---|---|
|
@@ -56,60 +56,6 @@ jobs: | |
path: ${{ env.PROJECT_NAME }}-${{ env.PLATFORM }}-${{ env.VERSION }}.zip | ||
key: ${{ github.run_id }}-${{ github.run_number }}_${{ env.PROJECT_NAME }}-${{ env.PLATFORM }}-${{ env.VERSION }}.zip | ||
|
||
build-mac: | ||
runs-on: macos-latest | ||
env: | ||
PLATFORM: mac | ||
name: 'Build Mac' | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/[email protected] | ||
- name: Load SmalltalkCI environment | ||
uses: hpi-swa/[email protected] | ||
id: smalltalkci | ||
with: | ||
smalltalk-image: Pharo64-11 | ||
- name: Prepare image and test | ||
run: smalltalkci -s ${{ steps.smalltalkci.outputs.smalltalk-image }} | ||
shell: bash | ||
timeout-minutes: 12 | ||
- name: Create zip | ||
run: chmod u+x .github/scripts/build-mac.sh; ./.github/scripts/build-mac.sh | ||
env: | ||
ACTIONS_READ_ACCESS_TOKEN: ${{ secrets.ACTIONS_READ_ACCESS_TOKEN }} | ||
- name: Cache zip | ||
uses: actions/cache/[email protected] | ||
with: | ||
path: ${{ env.PROJECT_NAME }}-${{ env.PLATFORM }}-${{ env.VERSION }}.zip | ||
key: ${{ github.run_id }}-${{ github.run_number }}_${{ env.PROJECT_NAME }}-${{ env.PLATFORM }}-${{ env.VERSION }}.zip | ||
|
||
build-win: | ||
runs-on: windows-latest | ||
env: | ||
PLATFORM: win | ||
name: 'Build Windows' | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/[email protected] | ||
- name: Load SmalltalkCI environment | ||
uses: hpi-swa/[email protected] | ||
id: smalltalkci | ||
with: | ||
smalltalk-image: Pharo64-11 | ||
- name: Prepare image and test | ||
run: smalltalkci -s ${{ steps.smalltalkci.outputs.smalltalk-image }} | ||
shell: bash | ||
timeout-minutes: 20 | ||
- name: Create zip | ||
run: ./.github/scripts/build-win.ps1 | ||
env: | ||
ACTIONS_READ_ACCESS_TOKEN: ${{ secrets.ACTIONS_READ_ACCESS_TOKEN }} | ||
- name: Cache zip | ||
uses: actions/cache/[email protected] | ||
with: | ||
path: ${{ env.PROJECT_NAME }}-${{ env.PLATFORM }}-${{ env.VERSION }}.zip | ||
key: ${{ github.run_id }}-${{ github.run_number }}_${{ env.PROJECT_NAME }}-${{ env.PLATFORM }}-${{ env.VERSION }}.zip | ||
|
||
check-linux-cache: | ||
needs: build-linux | ||
runs-on: ubuntu-latest | ||
|
@@ -127,43 +73,26 @@ jobs: | |
if: steps.get-zip.outputs.cache-hit != 'true' | ||
run: exit 1 | ||
|
||
check-mac-cache: | ||
needs: build-mac | ||
runs-on: macos-latest | ||
name: 'Check Mac zip is created' | ||
env: | ||
PLATFORM: mac | ||
steps: | ||
- name: Get zip from cache | ||
id: get-zip | ||
uses: actions/cache/[email protected] | ||
with: | ||
path: ${{ env.PROJECT_NAME }}-${{ env.PLATFORM }}-${{ env.VERSION }}.zip | ||
key: ${{ github.run_id }}-${{ github.run_number }}_${{ env.PROJECT_NAME }}-${{ env.PLATFORM }}-${{ env.VERSION }}.zip | ||
- name: Fail on cache miss | ||
if: steps.get-zip.outputs.cache-hit != 'true' | ||
run: exit 1 | ||
|
||
check-win-cache: | ||
needs: build-win | ||
runs-on: windows-latest | ||
name: 'Check Windows zip is created' | ||
env: | ||
PLATFORM: win | ||
save-statsa: | ||
needs: [check-linux-cache] | ||
runs-on: ubuntu-latest | ||
name: 'Save dl stats of previous build' | ||
env: | ||
PLATFORM: linux | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/[email protected] | ||
- name: Get zip from cache | ||
id: get-zip | ||
uses: actions/cache/[email protected] | ||
with: | ||
path: ${{ env.PROJECT_NAME }}-${{ env.PLATFORM }}-${{ env.VERSION }}.zip | ||
key: ${{ github.run_id }}-${{ github.run_number }}_${{ env.PROJECT_NAME }}-${{ env.PLATFORM }}-${{ env.VERSION }}.zip | ||
- name: Fail on cache miss | ||
if: steps.get-zip.outputs.cache-hit != 'true' | ||
run: exit 1 | ||
|
||
- name: Save dl stats of previous build | ||
run: chmod u+x .github/scripts/save-stats.sh; ./.github/scripts/save-stats.sh | ||
|
||
save-stats: | ||
needs: [check-linux-cache, check-mac-cache, check-win-cache] | ||
save-statsb: | ||
needs: [check-linux-cache] | ||
runs-on: ubuntu-latest | ||
name: 'Save dl stats of previous build' | ||
env: | ||
|
@@ -180,133 +109,57 @@ jobs: | |
- name: Save dl stats of previous build | ||
run: chmod u+x .github/scripts/save-stats.sh; ./.github/scripts/save-stats.sh | ||
|
||
|
||
create-release: | ||
needs: save-stats | ||
runs-on: ubuntu-latest | ||
name: 'Re-create release' | ||
env: | ||
PLATFORM: linux | ||
steps: | ||
- name: Re-create release | ||
uses: "marvinpinto/action-automatic-releases@latest" | ||
with: | ||
repo_token: "${{ secrets.GITHUB_TOKEN }}" | ||
automatic_release_tag: "nightly" | ||
prerelease: true | ||
title: "nightly" | ||
|
||
upload-linux-zip: | ||
needs: create-release | ||
save-statsc: | ||
needs: [check-linux-cache] | ||
runs-on: ubuntu-latest | ||
name: 'Upload Linux zip' | ||
name: 'Save dl stats of previous build' | ||
env: | ||
PLATFORM: linux | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/[email protected] | ||
- name: Get zip from cache | ||
id: get-zip | ||
uses: actions/cache/[email protected] | ||
with: | ||
path: ${{ env.PROJECT_NAME }}-${{ env.PLATFORM }}-${{ env.VERSION }}.zip | ||
key: ${{ github.run_id }}-${{ github.run_number }}_${{ env.PROJECT_NAME }}-${{ env.PLATFORM }}-${{ env.VERSION }}.zip | ||
- name: Get Release by Tag | ||
id: get_release_by_tag | ||
uses: jonfriesen/[email protected] | ||
with: | ||
tag_name: nightly | ||
- name: Upload zip | ||
id: upload-zip | ||
uses: actions/[email protected] | ||
with: | ||
upload_url: ${{ steps.get_release_by_tag.outputs.upload_url }} | ||
asset_path: ./${{ env.PROJECT_NAME }}-${{ env.PLATFORM }}-${{ env.VERSION }}.zip | ||
asset_name: ${{ env.PROJECT_NAME }}-${{ env.PLATFORM }}-${{ env.VERSION }}.zip | ||
asset_content_type: application/zip | ||
- name: Save dl stats of previous build | ||
run: chmod u+x .github/scripts/save-stats.sh; ./.github/scripts/save-stats.sh | ||
|
||
upload-mac-zip: | ||
needs: create-release | ||
runs-on: macos-latest | ||
name: 'Upload Mac zip' | ||
save-statsd: | ||
needs: [check-linux-cache] | ||
runs-on: ubuntu-latest | ||
name: 'Save dl stats of previous build' | ||
env: | ||
PLATFORM: mac | ||
PLATFORM: linux | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/[email protected] | ||
- name: Get zip from cache | ||
id: get-zip | ||
uses: actions/cache/[email protected] | ||
with: | ||
path: ${{ env.PROJECT_NAME }}-${{ env.PLATFORM }}-${{ env.VERSION }}.zip | ||
key: ${{ github.run_id }}-${{ github.run_number }}_${{ env.PROJECT_NAME }}-${{ env.PLATFORM }}-${{ env.VERSION }}.zip | ||
- name: Get Release by Tag | ||
id: get_release_by_tag | ||
uses: jonfriesen/[email protected] | ||
with: | ||
tag_name: nightly | ||
- name: Upload zip | ||
id: upload-zip | ||
uses: actions/[email protected] | ||
with: | ||
upload_url: ${{ steps.get_release_by_tag.outputs.upload_url }} | ||
asset_path: ./${{ env.PROJECT_NAME }}-${{ env.PLATFORM }}-${{ env.VERSION }}.zip | ||
asset_name: ${{ env.PROJECT_NAME }}-${{ env.PLATFORM }}-${{ env.VERSION }}.zip | ||
asset_content_type: application/zip | ||
- name: Save dl stats of previous build | ||
run: chmod u+x .github/scripts/save-stats.sh; ./.github/scripts/save-stats.sh | ||
|
||
upload-win-zip: | ||
needs: create-release | ||
runs-on: windows-latest | ||
name: 'Upload Windows zip' | ||
save-statse: | ||
needs: [check-linux-cache] | ||
runs-on: ubuntu-latest | ||
name: 'Save dl stats of previous build' | ||
env: | ||
PLATFORM: win | ||
PLATFORM: linux | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/[email protected] | ||
- name: Get zip from cache | ||
id: get-zip | ||
uses: actions/cache/[email protected] | ||
with: | ||
path: ${{ env.PROJECT_NAME }}-${{ env.PLATFORM }}-${{ env.VERSION }}.zip | ||
key: ${{ github.run_id }}-${{ github.run_number }}_${{ env.PROJECT_NAME }}-${{ env.PLATFORM }}-${{ env.VERSION }}.zip | ||
- name: Get Release by Tag | ||
id: get_release_by_tag | ||
uses: jonfriesen/[email protected] | ||
with: | ||
tag_name: nightly | ||
- name: Upload zip | ||
id: upload-zip | ||
uses: actions/[email protected] | ||
with: | ||
upload_url: ${{ steps.get_release_by_tag.outputs.upload_url }} | ||
asset_path: ./${{ env.PROJECT_NAME }}-${{ env.PLATFORM }}-${{ env.VERSION }}.zip | ||
asset_name: ${{ env.PROJECT_NAME }}-${{ env.PLATFORM }}-${{ env.VERSION }}.zip | ||
asset_content_type: application/zip | ||
|
||
create-dependent-matrix: | ||
needs: [create-release] | ||
runs-on: ubuntu-latest | ||
name: 'Find dependent repositories' | ||
if: ${{ github.event_name == 'push' || contains(github.event.inputs.build-dependent || false, 'true') }} | ||
outputs: | ||
matrix: ${{ steps.set-matrix.outputs.matrix }} | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/[email protected] | ||
- name: Check list of repositories exists | ||
id: check-file | ||
run: test -f ./.github/dependent-repositories.txt || exit 1 | ||
- name: Create dependent build matrix | ||
id: set-matrix | ||
run: echo "::set-output name=matrix::`cat ./.github/dependent-repositories.txt | tr -d " \t\n\r"`" | ||
- name: Save dl stats of previous build | ||
run: chmod u+x .github/scripts/save-stats.sh; ./.github/scripts/save-stats.sh | ||
|
||
build-dependent: | ||
needs: [create-dependent-matrix] | ||
runs-on: ubuntu-latest | ||
name: 'Build dependent' | ||
if: ${{ contains(needs.create-dependent-matrix.outputs.matrix, '/') }} | ||
strategy: | ||
matrix: ${{fromJson(needs.create-dependent-matrix.outputs.matrix)}} | ||
steps: | ||
- name: Start ${{ matrix.repository }} build | ||
uses: benc-uk/[email protected] | ||
with: | ||
workflow: Nightly | ||
repo: ${{ matrix.repository }} | ||
ref: ${{ matrix.branch }} | ||
token: ${{ secrets.WORKFLOW_ACCESS_TOKEN }} | ||
inputs: '{ "build-dependent": "${{ matrix.build-dependent }}" }' |