Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI never sets AGDA_COMMIT in certain runs #2188

Open
andreasabel opened this issue Oct 31, 2023 · 3 comments
Open

CI never sets AGDA_COMMIT in certain runs #2188

andreasabel opened this issue Oct 31, 2023 · 3 comments

Comments

@andreasabel
Copy link
Member

This is the current logic to set AGDA_COMMIT:

if [[ '${{ github.ref }}' == 'refs/heads/master' \
|| '${{ github.base_ref }}' == 'master' ]]; then
# Pick Agda version for master
echo "AGDA_COMMIT=tags/v2.6.4" >> $GITHUB_ENV;
echo "AGDA_HTML_DIR=html/master" >> $GITHUB_ENV
elif [[ '${{ github.ref }}' == 'refs/heads/experimental' \
|| '${{ github.base_ref }}' == 'experimental' ]]; then
# Pick Agda version for experimental
echo "AGDA_COMMIT=4d36cb37f8bfb765339b808b13356d760aa6f0ec" >> $GITHUB_ENV;
echo "AGDA_HTML_DIR=html/experimental" >> $GITHUB_ENV
fi

This is how it pans out: https://github.com/agda/agda-stdlib/actions/runs/6688745401/job/18171228466#step:2:2

   if [[ 'refs/heads/gh-readonly-queue/master/pr-2185-aba7a8abd6908ad1126c4c0e3216b9c3a354ab47' == 'refs/heads/master' \
     || '' == 'master' ]]; then
    # Pick Agda version for master
    echo "AGDA_COMMIT=tags/v2.6.4" >> $GITHUB_ENV;
    echo "AGDA_HTML_DIR=html/master" >> $GITHUB_ENV
  elif [[ 'refs/heads/gh-readonly-queue/master/pr-2185-aba7a8abd6908ad1126c4c0e3216b9c3a354ab47' == 'refs/heads/experimental' \
       || '' == 'experimental' ]]; then
    # Pick Agda version for experimental
    echo "AGDA_COMMIT=4d36cb37f8bfb765339b808b13356d760aa6f0ec" >> $GITHUB_ENV;
    echo "AGDA_HTML_DIR=html/experimental" >> $GITHUB_ENV
  fi

You can see that none of the conditions becomes true here.

@gallais
Copy link
Member

gallais commented Oct 31, 2023

What is the suggested fix? We cannot know which version of Agda to use a priori.

@andreasabel
Copy link
Member Author

Seems like @MatthewDaggitt is already working on this in

But, dunno. Could you have agda as a submodule`? Can repos be submodules of each other?

@MatthewDaggitt
Copy link
Contributor

I've set it to use master by default which gets us off the ground for now. But yes, we need a solution to this if we want to start merging things in experimental again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants