Skip to content

Commit

Permalink
ci/install: upload packages in a separated step
Browse files Browse the repository at this point in the history
Signed-off-by: Unai Martinez-Corral <[email protected]>
  • Loading branch information
umarcor committed May 20, 2022
1 parent e3f409f commit 00e2c60
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 19 deletions.
18 changes: 0 additions & 18 deletions .github/ci/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,21 +62,3 @@ heading "Compressing install dir (creating packages)"
rm -rf install
)
echo "----------------------------------------"

GCP_PATH=symbiflow-arch-defs/artifacts/prod/foss-fpga-tools/symbiflow-arch-defs/continuous/install

heading "Uploading packages"
(
if [ "$UPLOAD_PACKAGES" != "true" ]; then
echo "Not uploading packages as not requested by the CI"
exit 0
fi
TIMESTAMP=$(date +'%Y%m%d-%H%M%S')
echo "> Timestamp: $TIMESTAMP"

echo 'Timestamp: $TIMESTAMP' >> $GITHUB_STEP_SUMMARY
echo 'Hash: '"$(echo ${package} | sed 's/.*-\(.*\)\.tar\.xz/\1/')" >> $GITHUB_STEP_SUMMARY

for package in $(ls *.tar.xz); do gsutil cp ${package} gs://${GCP_PATH}/${TIMESTAMP}/; done
)
echo "----------------------------------------"
15 changes: 14 additions & 1 deletion .github/workflows/Tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ jobs:
MAX_CORES: 80
GHA_EXTERNAL_DISK: "tools"
GHA_SA: "gh-sa-f4pga-arch-defs-ci"
UPLOAD_PACKAGES: ${{ github.event_name == 'push' && github.ref_name == 'main' }}

steps:

Expand All @@ -76,6 +75,20 @@ jobs:
- name: '🚧 Execute test script'
run: stdbuf -i0 -o0 -e0 ./.github/ci/install.sh

- name: 🚀 Upload to Google Cloud Storage (GCS) bucket
if: github.event_name == 'push' && github.ref_name == 'main'
run: |
TIMESTAMP=$(date +'%Y%m%d-%H%M%S')
echo "> Timestamp: $TIMESTAMP"
echo 'Timestamp: $TIMESTAMP' >> $GITHUB_STEP_SUMMARY
echo 'Hash: '"$(echo ${package} | sed 's/.*-\(.*\)\.tar\.xz/\1/')" >> $GITHUB_STEP_SUMMARY
for package in $(ls *.tar.xz); do
gsutil cp ${package} \
gs://symbiflow-arch-defs/artifacts/prod/foss-fpga-tools/symbiflow-arch-defs/continuous/install/${TIMESTAMP}/
done
- name: '📤 Upload artifact: results and plot'
uses: actions/upload-artifact@v3
if: ${{ always() }}
Expand Down

0 comments on commit 00e2c60

Please sign in to comment.