mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-29 14:44:03 +03:00
[ ci ] controlling builds via commit messages (#1766)
This commit is contained in:
parent
74db7714d4
commit
34167d58bb
66
.github/workflows/ci-idris2.yml
vendored
66
.github/workflows/ci-idris2.yml
vendored
@ -6,16 +6,56 @@ on:
|
||||
- '*'
|
||||
tags:
|
||||
- '*'
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
- 'icons/**'
|
||||
- '*.md'
|
||||
- 'CONTRIBUTORS'
|
||||
- 'LICENSE'
|
||||
- '.github/workflows/ci-lint.yml'
|
||||
- '.github/workflows/ci-sphinx.yml'
|
||||
- '.github/workflows/ci-super-linter.yml'
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
- main
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
- 'icons/**'
|
||||
- '*.md'
|
||||
- 'CONTRIBUTORS'
|
||||
- 'LICENSE'
|
||||
- '.github/workflows/ci-lint.yml'
|
||||
- '.github/workflows/ci-sphinx.yml'
|
||||
- '.github/workflows/ci-super-linter.yml'
|
||||
|
||||
env:
|
||||
IDRIS2_VERSION: 0.4.0 # For previous-version build
|
||||
|
||||
jobs:
|
||||
|
||||
initialise:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Project
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
# for pull_request so we can do HEAD^2
|
||||
fetch-depth: 2
|
||||
|
||||
- name: Get commit message
|
||||
id: get_commit_message
|
||||
run: |
|
||||
if [[ '${{ github.event_name }}' == 'push' ]]; then
|
||||
echo ::set-output name=commit_message::$(git log --format=%B -n 1 HEAD)
|
||||
elif [[ '${{ github.event_name }}' == 'pull_request' ]]; then
|
||||
echo ::set-output name=commit_message::$(git log --format=%B -n 1 HEAD^2)
|
||||
fi
|
||||
|
||||
outputs:
|
||||
commit_message:
|
||||
echo "${{ steps.get_commit_message.outputs.commit_message }}"
|
||||
|
||||
######################################################################
|
||||
# Build from the previous version
|
||||
# We perform this check before all the other ones because:
|
||||
@ -24,7 +64,10 @@ jobs:
|
||||
######################################################################
|
||||
|
||||
quick-check:
|
||||
needs: initialise
|
||||
runs-on: ubuntu-latest
|
||||
if: |
|
||||
!contains(needs.initialise.outputs.commit_message, '[ci: skip]')
|
||||
env:
|
||||
IDRIS2_CG: chez
|
||||
SCHEME: scheme
|
||||
@ -79,6 +122,10 @@ jobs:
|
||||
ubuntu-bootstrap-chez:
|
||||
needs: quick-check
|
||||
runs-on: ubuntu-latest
|
||||
if: |
|
||||
!contains(needs.initialise.outputs.commit_message, '[ci:')
|
||||
|| contains(needs.initialise.outputs.commit_message, '[ci: ubuntu]')
|
||||
|| contains(needs.initialise.outputs.commit_message, '[ci: chez]')
|
||||
env:
|
||||
IDRIS2_CG: chez
|
||||
SCHEME: scheme
|
||||
@ -104,6 +151,10 @@ jobs:
|
||||
macos-bootstrap-chez:
|
||||
needs: quick-check
|
||||
runs-on: macos-latest
|
||||
if: |
|
||||
!contains(needs.initialise.outputs.commit_message, '[ci:')
|
||||
|| contains(needs.initialise.outputs.commit_message, '[ci: macos]')
|
||||
|| contains(needs.initialise.outputs.commit_message, '[ci: chez]')
|
||||
env:
|
||||
SCHEME: chez
|
||||
steps:
|
||||
@ -128,6 +179,10 @@ jobs:
|
||||
windows-bootstrap-chez:
|
||||
needs: quick-check
|
||||
runs-on: windows-latest
|
||||
if: |
|
||||
!contains(needs.initialise.outputs.commit_message, '[ci:')
|
||||
|| contains(needs.initialise.outputs.commit_message, '[ci: windows]')
|
||||
|| contains(needs.initialise.outputs.commit_message, '[ci: chez]')
|
||||
env:
|
||||
MSYSTEM: MINGW64
|
||||
MSYS2_PATH_TYPE: inherit
|
||||
@ -173,6 +228,10 @@ jobs:
|
||||
nix-bootstrap-chez:
|
||||
needs: quick-check
|
||||
runs-on: ubuntu-latest
|
||||
if: |
|
||||
!contains(needs.initialise.outputs.commit_message, '[ci:')
|
||||
|| contains(needs.initialise.outputs.commit_message, '[ci: nix]')
|
||||
|| contains(needs.initialise.outputs.commit_message, '[ci: chez]')
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
@ -187,6 +246,10 @@ jobs:
|
||||
ubuntu-bootstrap-racket:
|
||||
needs: quick-check
|
||||
runs-on: ubuntu-latest
|
||||
if: |
|
||||
!contains(needs.initialise.outputs.commit_message, '[ci:')
|
||||
|| contains(needs.initialise.outputs.commit_message, '[ci: ubuntu]')
|
||||
|| contains(needs.initialise.outputs.commit_message, '[ci: racket]')
|
||||
env:
|
||||
IDRIS2_CG: racket
|
||||
steps:
|
||||
@ -292,6 +355,9 @@ jobs:
|
||||
ubuntu-self-host-previous-version:
|
||||
needs: quick-check
|
||||
runs-on: ubuntu-latest
|
||||
if: |
|
||||
!contains(needs.initialise.outputs.commit_message, '[ci:')
|
||||
|| contains(needs.initialise.outputs.commit_message, '[ci: ubuntu]')
|
||||
env:
|
||||
IDRIS2_CG: chez
|
||||
steps:
|
||||
|
Loading…
Reference in New Issue
Block a user