workflow debug 2 #526
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
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 | |
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 | |
save-stats: | |
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: Save dl stats of previous build | |
run: chmod u+x .github/scripts/save-stats.sh; ./.github/scripts/save-stats.sh |