11#
2- # GitHub actions to build and test python-package.
2+ # GitHub actions for building and testing python-package on bare GitHub VMs .
33#
44# Don't use `-latest` for targeted VMs, pin specific OS versions instead.
55# https://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners
3838 if : startsWith(matrix.runs-on, 'ubuntu')
3939 run : sudo apt-get install -y libncurses5-dev
4040
41- # GHA 's checkout action seems to be misbehaving on ARM64 and consequently
42- # our build script can't get current revision from cloned sources .
41+ # Git 's version on our ARM64 runner is too old for actions/checkout to
42+ # create a local repo. Beware this fails on opening a new PR .
4343 - name : Clone sources independently
4444 run : |
4545 git init $CHEVAH_REPO
5454 # Prepare the code.
5555 git clean -f
5656 git reset --hard ${{ github.event.after }}
57+ git log -1 --format='%H'
5758
5859 - name : Detect OS and build Python
5960 run : |
7273 ./chevah_build compat
7374
7475 # Upload using a (per-OS selected) sftp command, then show final links.
75- # Remove key in same step to have it deleted even if publishing fails.
7676 - name : Upload testing package
7777 run : |
7878 mkdir -pv ~/.ssh/
8181 chmod 600 priv_key
8282 echo "${{ secrets.SFTPPLUS_BIN_PRIV_KEY }}" > priv_key
8383 echo "${{ secrets.SFTPPLUS_BIN_HOST_KEY }}" > ~/.ssh/known_hosts
84- ./publish_dist.sh ; rm priv_key
84+ ./publish_dist.sh
85+ rm priv_key
8586
8687 # If one of the above steps fails, fire up tmate for remote debugging.
8788 - name : Tmate debug on failure
@@ -150,7 +151,8 @@ jobs:
150151 chmod 600 priv_key
151152 echo "${{ secrets.SFTPPLUS_BIN_PRIV_KEY }}" > priv_key
152153 echo "${{ secrets.SFTPPLUS_BIN_HOST_KEY }}" > ~/.ssh/known_hosts
153- ./publish_dist.sh ; rm priv_key
154+ ./publish_dist.sh
155+ rm priv_key
154156
155157 - name : Tmate debug on failure
156158 if : failure() && env.TMATE_DEBUG == 'yes'
@@ -214,7 +216,6 @@ jobs:
214216 # which is more finicky in regards to file permissions.
215217 # Beware the commands in this step run under PowerShell.
216218 - name : Prepare SFTP upload
217- shell : powershell
218219 run : |
219220 mkdir -p ~/.ssh/
220221 cd python-package/
@@ -226,7 +227,11 @@ jobs:
226227 choco install --yes --no-progress openssh
227228
228229 - name : Upload testing package
229- run : bash -c 'cd python-package; ./publish_dist.sh ; rm priv_key'
230+ shell : bash
231+ run : |
232+ cd python-package
233+ ./publish_dist.sh
234+ rm priv_key
230235
231236 - name : Tmate debug on failure
232237 if : failure() && env.TMATE_DEBUG == 'yes'
0 commit comments