This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
# TODO: change to cron-based schedule one this is working | |
push: | |
branches: | |
- main | |
jobs: | |
test: | |
name: "Test dask and distributed" | |
# TODO: change to appropriate image | |
runs-on: ubuntu-latest | |
steps: | |
# - name: Checkout dask | |
# uses: actions/checkout@v4 | |
# with: | |
# repository: dask/dask | |
# path: dask | |
# - name: Checkout distributed | |
# uses: actions/checkout@v4 | |
# with: | |
# repository: dask/distributed | |
# path: distributed | |
# - name: Run | |
# run: | | |
# (cd dask; git rev-parse HEAD; | |
# cd ../distributed; git rev-parse HEAD) | tee commit-hashes.txt | |
# - name: Upload commit hashes | |
# uses: actions/upload-artifact@v4 | |
# with: | |
# name: commit-hashes.txt | |
# path: commit-hashes.txt | |
# # TODO: This one is wrong, need to use the REST API to get the most recently uploaded artifact id. | |
- name: Setup python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.12 | |
- name: Checkout ourselves | |
uses: actions/checkout@v4 | |
with: | |
path: utils | |
- name: Stuff | |
id: get_last_id | |
run: | | |
pip install requests | |
VAL=$(python utils/get.py) | |
echo $VAL | |
echo $VAL >> $GITHUB_OUTPUT | |
- name: Download last run commit hashes | |
continue-on-error: true | |
uses: actions/download-artifact@v4 | |
with: | |
name: commit-hashes.txt | |
path: previous-run-hashes.txt | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
run-id: ${{ job.get_last_id.LAST_RUN_ID }} | |
- name: Look at output | |
run: | |
echo "last id" ${{ job.get_last_id.LAST_RUN_ID }} | |
echo "has id" ${{ job.get_last_id.HAS_LAST_ID }} | |
# - name: Check if run needed | |
# run: | | |
# if [ ! -f previous-run-hashes.txt ]; then | |
# echo "No previous run hashes, need to re-run" | |
# elif cmp -s commit-hashes.txt previous-run-hashes.txt; then | |
# echo "Previous run hash same as this one, no need to re-run" | |
# else | |
# echo "Previous run hash different, need to re-run" | |
# fi |