Skip to content

Commit

Permalink
Merge pull request #420 from MSoegtropIMC/macos-upload-build-on-failure
Browse files Browse the repository at this point in the history
- Macos upload opam build and log folder on failure
- update versions of Github actions
  • Loading branch information
MSoegtropIMC authored Jul 9, 2024
2 parents 0f6181d + b462799 commit 499489d
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 20 deletions.
28 changes: 21 additions & 7 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
- '8.17~2023.08'
steps:
- name: Git checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set PLATFORM
if: ${{ github.event.inputs.platform != '' }}
Expand Down Expand Up @@ -101,6 +101,20 @@ jobs:
shell: bash
run: ./coq_platform_make.sh -packages=${{matrix.variant}} $PLATFORM_ARGS -dumplogs

- name: 'Upload opam log folder on failure'
uses: actions/upload-artifact@v4
if: failure()
with:
name: 'Opam log folder ${{matrix.variant}}'
path: /Users/runner/.opam/log/

- name: 'Upload opam build folder on failure'
uses: actions/upload-artifact@v4
if: failure()
with:
name: 'Opam build folder ${{matrix.variant}}'
path: /Users/runner/.opam/CP*${{matrix.variant}}/.opam-switch/build

- name: Install bash (needed by smoke scripts)
run: brew install bash

Expand All @@ -112,7 +126,7 @@ jobs:
shell_scripts/create_smoke_test_kit.sh
- name: 'Upload smoke test kit'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: 'Smoke Test Kit Macos ${{matrix.variant}}'
path: smoke-test-kit/
Expand All @@ -125,7 +139,7 @@ jobs:
pip3 install macpack
- name: 'Build DMG installer'
uses: Wandalen/wretry.action@v1.3.0
uses: Wandalen/wretry.action@v3
with:
attempt_limit: 5
attempt_delay: 5000
Expand All @@ -134,14 +148,14 @@ jobs:
macos/create_installer_macos.sh
- name: 'Upload DMG script logs on failure'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: failure()
with:
name: 'DMG script error logs ${{matrix.variant}}'
path: macos_installer/logs/

- name: 'Upload Artifact'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: 'Macos installer ${{matrix.variant}} x86_64'
path: macos_installer/Coq-Platform-*.dmg
Expand All @@ -165,13 +179,13 @@ jobs:
run: brew install bash

- name: 'Download Artifact'
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
id: download
with:
name: 'Macos installer ${{matrix.variant}} x86_64'

- name: 'Download smoke test kit'
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
id: download-smoke
with:
name: 'Smoke Test Kit Macos ${{matrix.variant}}'
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:

steps:
- name: Git checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set PLATFORM
if: ${{ github.event.inputs.platform != '' }}
Expand Down Expand Up @@ -99,7 +99,7 @@ jobs:
smoke-test-kit/run-smoke-test.sh
- name: 'Upload smoke test kit'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: 'Smoke Test Kit ${{matrix.variant}}'
path: smoke-test-kit
Expand All @@ -112,7 +112,7 @@ jobs:

steps:
- name: Git checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set PLATFORM
if: ${{ github.event.inputs.platform != '' }}
Expand All @@ -137,7 +137,7 @@ jobs:
run: cat /home/runner/.local/state/snapcraft/log/*

- name: Save Artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: 'Snap package'
path: ${{ steps.build.outputs.snap }}
Expand Down Expand Up @@ -170,13 +170,13 @@ jobs:
run: echo "SNAP_PICK=${{ github.event.inputs.snap_pick }}" >> $GITHUB_ENV

- name: Download Artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
id: download-snap
with:
name: 'Snap package'

- name: 'Download smoke test kit'
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
id: download-smoke
with:
name: 'Smoke Test Kit ${{ env.SNAP_PICK }}'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ubuntu_dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:

steps:
- name: Git checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set PLATFORM
if: ${{ github.event.inputs.platform != '' }}
Expand Down Expand Up @@ -72,7 +72,7 @@ jobs:
smoke-test-kit/run-smoke-test.sh
- name: 'Upload smoke test kit'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: 'Smoke Test Kit ${{matrix.variant}}'
path: smoke-test-kit
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
git config --global core.eol lf
- name: Git checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set PLATFORM
if: ${{ github.event.inputs.platform != '' }}
Expand All @@ -82,14 +82,14 @@ jobs:
run: C:\cygwin_coq_platform\bin\bash --login -c "cd /platform/ && shell_scripts/create_smoke_test_kit.sh && mkdir /cygdrive/c/smoke && cp -ra smoke-test-kit/* /cygdrive/c/smoke/"

- name: 'Upload Artifact'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: 'Windows installer ${{matrix.variant}} ${{matrix.architecture}}'
path: C:\installer\*.exe
retention-days: 5

- name: 'Upload smoke test kit'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: 'Smoke Test Kit Windows ${{matrix.variant}} ${{matrix.architecture}}'
path: C:\smoke\
Expand All @@ -112,13 +112,13 @@ jobs:

steps:
- name: 'Download Artifact'
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
id: download
with:
name: 'Windows installer ${{matrix.variant}} ${{matrix.architecture}}'

- name: 'Download smoke test kit'
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
id: download-smoke
with:
name: 'Smoke Test Kit Windows ${{matrix.variant}} ${{matrix.architecture}}'
Expand Down

0 comments on commit 499489d

Please sign in to comment.