Skip to content

workflow debug 5

workflow debug 5 #534

Workflow file for this run

name: Nightly
on:
workflow_dispatch:
inputs:
build-dependent:
description: 'Should build dependent repositories? (true/false)'
required: false
default: false
push:
branches:
- 'master'
workflow_call:
secrets:
WORKFLOW_ACCESS_TOKEN:
required: true
ACTIONS_READ_ACCESS_TOKEN:
required: true
schedule:
- cron: "42 23 31 12 *"
env:
REPOSITORY_NAME: ${{ github.event.repository.name }}
PROJECT_NAME: 'openponk-${{ github.event.repository.name }}'
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VERSION: 'nightly'
cache-name: zip-cache
RUN_ID: ${{ github.run_id }}
jobs:
build-linux:
runs-on: ubuntu-latest
env:
PLATFORM: linux
name: 'Build Linux'
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-linux.sh; ./.github/scripts/build-linux.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-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
name: 'Check Linux zip is created'
env:
PLATFORM: linux
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-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
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
save-stats:
needs: [check-linux-cache, check-mac-cache, check-win-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: 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
runs-on: ubuntu-latest
name: 'Upload Linux zip'
env:
PLATFORM: linux
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: 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
upload-mac-zip:
needs: create-release
runs-on: macos-latest
name: 'Upload Mac zip'
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: 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
upload-win-zip:
needs: create-release
runs-on: windows-latest
name: 'Upload Windows zip'
env:
PLATFORM: win
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: 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"`"
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 }}" }'