Skip to content

Commit

Permalink
Fixes in release checks workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
gavv committed Sep 21, 2023
1 parent 0b2b5b4 commit 3d68cc2
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 40 deletions.
30 changes: 0 additions & 30 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ jobs:
uses: actions/checkout@v3
with:
submodules: recursive


- name: Build and test
run: |
Expand Down Expand Up @@ -153,7 +152,6 @@ jobs:
uses: actions/checkout@v3
with:
submodules: recursive
fetch-tags: true

- name: Build and test
run: |
Expand Down Expand Up @@ -317,31 +315,3 @@ jobs:
if: failure()
run: |
scripts/ci_checks/failure.sh
release-checks:
runs-on: ubuntu-latest

if: ${{ startsWith(github.ref, 'refs/tags/v') }}
strategy:
fail-fast: false
matrix:
include:
- script: linux-checks/check-version

name: ${{ matrix.script }}
steps:

- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
fetch-tags: true

- name: Build and test
run: |
scripts/ci_checks/${{ matrix.script }}.sh
- name: Handle failure
if: failure()
run: |
scripts/ci_checks/failure.sh
28 changes: 27 additions & 1 deletion .github/workflows/package.yml → .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "create packages"
name: "release"

on:
push:
Expand All @@ -8,14 +8,40 @@ on:
workflow_dispatch:

jobs:
checks:
if: ${{ startsWith(github.ref, 'refs/tags/v') }}

runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
include:
- script: linux-checks/check-version

name: ${{ matrix.script }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0

- name: Run check
run: |
scripts/ci_checks/${{ matrix.script }}.sh
package:
if: startsWith(github.ref, 'refs/tags/v')
needs: [checks]

runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0

- name: Version
Expand Down
16 changes: 7 additions & 9 deletions scripts/ci_checks/linux-checks/check-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,19 @@

set -euo pipefail


tagname="$(git tag -l | tail -n1)"

header_tagname="v$(python3 scripts/scons_helpers/parse-version.py)"

if [[ "$tagname" != "$header_tagname" ]]; then
echo >&2
echo >&2"version check FAILED"
echo >&2"the git tag name and version declared in version.h is not the same"
echo >&2"${tagname} git version tag"
echo >&2"${header_tagname} header version tag"
echo >&2
echo
echo "version check FAILED"
echo "the git tag name and version declared in version.h is not the same"
echo "${tagname} git version tag"
echo "${header_tagname} header version tag"
echo
exit 1
fi

echo "version check SUCCEEDED"
echo

echo

0 comments on commit 3d68cc2

Please sign in to comment.