Skip to content

Commit

Permalink
[install] in archiver.yml, simplify and improve debug printouts
Browse files Browse the repository at this point in the history
  • Loading branch information
valassi committed Oct 1, 2024
1 parent 97583d9 commit 86a3b03
Showing 1 changed file with 12 additions and 20 deletions.
32 changes: 12 additions & 20 deletions .github/workflows/archiver.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,21 +39,20 @@ jobs:

- name: create_tarball_and_versiontxt
run: |
echo "Current directory is $(pwd)"
WORKDIR=$(pwd)
echo "WORKDIR=${WORKDIR}" >> $GITHUB_ENV
echo "HOME is ${HOME}"
echo "Current directory is $(pwd)"
echo "WORKDIR is ${WORKDIR}"
cd branch_PR
echo "Current directory is now $(pwd)"
echo "Current branch is $(git branch --show-current)"
echo "Current branch is \"$(git branch | \grep ^* | sed 's/^* //')\""
.github/workflows/archiver.sh
mv cudacpp.tar.gz ${WORKDIR}
mv VERSION.txt ${WORKDIR}
- name: check_versiontag_and_update_versiontxt
run: |
echo "HOME is ${HOME}"
echo "Current directory is $(pwd)"
echo "WORKDIR is ${WORKDIR}"
TAGPREFIX=cudacpp_for
echo "TAGPREFIX is ${TAGPREFIX}"
Expand Down Expand Up @@ -95,12 +94,10 @@ jobs:
# See https://cli.github.com/manual/gh_release_delete
# See https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/using-github-cli-in-workflows
run: |
echo "HOME is ${HOME}"
echo "Current directory is $(pwd)"
echo "WORKDIR is ${WORKDIR}"
cd branch_PR
echo "Current directory is now $(pwd)"
echo "Current branch is $(git branch --show-current)"
echo "Current branch is \"$(git branch | \grep ^* | sed 's/^* //')\""
if gh release view ${{ env.TAGNAME }}; then
echo "Deleting release ${{ env.TAGNAME }}"
gh release delete ${{ env.TAGNAME }} -y
Expand All @@ -114,12 +111,10 @@ jobs:
# See https://cli.github.com/manual/gh_release_delete
# See https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/using-github-cli-in-workflows
run: |
echo "HOME is ${HOME}"
echo "Current directory is $(pwd)"
echo "WORKDIR is ${WORKDIR}"
cd branch_PR
echo "Current directory is now $(pwd)"
echo "Current branch is $(git branch --show-current)"
echo "Current branch is \"$(git branch | \grep ^* | sed 's/^* //')\""
if gh release view ${{ env.TAGNAME_LATEST }}; then
echo "Deleting release ${{ env.TAGNAME_LATEST }} and the associated tag"
gh release delete ${{ env.TAGNAME_LATEST }} -y --cleanup-tag
Expand All @@ -131,12 +126,11 @@ jobs:

- name: create_runningtag
run: |
echo "HOME is ${HOME}"
echo "Current directory is $(pwd)"
echo "WORKDIR is ${WORKDIR}"
cd branch_PR
echo "Current directory is now $(pwd)"
echo "Current branch is $(git branch --show-current)"
echo "Current branch is \"$(git branch | \grep ^* | sed 's/^* //')\""
tagname=${TAGNAME}
echo "(From GITHUB_ENV) tagname = ${tagname}"
tagname_latest=${TAGNAME_LATEST}
Expand Down Expand Up @@ -165,7 +159,7 @@ jobs:
name: ${{ env.TAGNAME }}
body_path: versiontag.txt
# Previous attempt to upload files from ${HOME}/VERSION.txt and ${HOME}/cudacpp.tar.gz failed
# The current implementation uploads files from the default $WORKDIR (without giving the explicit full path)
# The current implementation uploads files from the default ${WORKDIR} (without giving the explicit full path)
files: |
cudacpp.tar.gz
VERSION.txt
Expand All @@ -180,7 +174,7 @@ jobs:
tag_name: refs/tags/${{ env.TAGNAME_LATEST }}
body_path: runningtag.txt
# Previous attempt to upload files from ${HOME}/VERSION.txt and ${HOME}/cudacpp.tar.gz failed
# The current implementation uploads files from the default $WORKDIR (without giving the explicit full path)
# The current implementation uploads files from the default ${WORKDIR} (without giving the explicit full path)
files: |
cudacpp.tar.gz
VERSION.txt
Expand All @@ -189,14 +183,13 @@ jobs:

- name: create_infodat
run: |
echo "HOME is ${HOME}"
echo "Current directory is $(pwd)"
echo "WORKDIR is ${WORKDIR}"
cd branch_PR
echo "Current directory is now $(pwd)"
echo "Current branch is $(git branch --show-current)"
echo "Current branch is \"$(git branch | \grep ^* | sed 's/^* //')\""
python3 .github/workflows/archiver.py version_info.dat
mv version_info.dat ${HOME}
mv version_info.dat ${WORKDIR}
- name: checkout_INFO
uses: actions/checkout@v4
Expand All @@ -206,13 +199,12 @@ jobs:

- name: commit_infodat
run: |
echo "HOME is ${HOME}"
echo "Current directory is $(pwd)"
echo "WORKDIR is ${WORKDIR}"
cd branch_INFO
echo "Current directory is now $(pwd)"
echo "Current branch is $(git branch --show-current)"
mv ${HOME}/version_info.dat .
echo "Current branch is \"$(git branch | \grep ^* | sed 's/^* //')\""
mv ${WORKDIR}/version_info.dat .
git config user.name github-actions
git config user.email [email protected]
if [ -z "$(git status --porcelain version_info.dat)" ]; then
Expand Down

0 comments on commit 86a3b03

Please sign in to comment.