From a891f2103ecb733db427f44c40254f2c356a2cbd Mon Sep 17 00:00:00 2001 From: Nolwen Date: Tue, 30 Nov 2021 11:17:07 +0100 Subject: [PATCH 01/60] List tags --- .github/workflows/blank.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/blank.yml b/.github/workflows/blank.yml index 8a57aeb..da1dc1b 100644 --- a/.github/workflows/blank.yml +++ b/.github/workflows/blank.yml @@ -66,3 +66,7 @@ jobs: if: ${{ github.ref == 'refs/heads/main' }} run: echo deploy + - name: tag + run: | + git branch + git tag \ No newline at end of file From ddc05518e73ad73cd99adfad4bd5f55e2bf94446 Mon Sep 17 00:00:00 2001 From: Nolwen Date: Tue, 30 Nov 2021 12:19:03 +0100 Subject: [PATCH 02/60] List remote --- .github/workflows/blank.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/blank.yml b/.github/workflows/blank.yml index da1dc1b..5d78ece 100644 --- a/.github/workflows/blank.yml +++ b/.github/workflows/blank.yml @@ -69,4 +69,5 @@ jobs: - name: tag run: | git branch - git tag \ No newline at end of file + git tag + git remote \ No newline at end of file From db1d68fdde8272668fae331c658cc33a719766dd Mon Sep 17 00:00:00 2001 From: Nolwen Date: Tue, 30 Nov 2021 12:21:08 +0100 Subject: [PATCH 03/60] Fetch toto --- .github/workflows/blank.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/blank.yml b/.github/workflows/blank.yml index 5d78ece..cbc1aa5 100644 --- a/.github/workflows/blank.yml +++ b/.github/workflows/blank.yml @@ -70,4 +70,6 @@ jobs: run: | git branch git tag - git remote \ No newline at end of file + git remote + git fetch origin toto + git branch \ No newline at end of file From 8f1ede4d2bfedf93dd85cea8246b5f34e6ada000 Mon Sep 17 00:00:00 2001 From: Nolwen Date: Tue, 30 Nov 2021 12:30:05 +0100 Subject: [PATCH 04/60] Add --all --- .github/workflows/blank.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/blank.yml b/.github/workflows/blank.yml index cbc1aa5..fb0fdf9 100644 --- a/.github/workflows/blank.yml +++ b/.github/workflows/blank.yml @@ -68,8 +68,8 @@ jobs: - name: tag run: | - git branch + git branch --all git tag git remote git fetch origin toto - git branch \ No newline at end of file + git branch --all \ No newline at end of file From 7f820e0beeb3837f297e42e67ce844f791f1e9dd Mon Sep 17 00:00:00 2001 From: Nolwen Date: Tue, 30 Nov 2021 14:38:42 +0100 Subject: [PATCH 05/60] Tag binder env on releases --- .github/workflows/release.yml | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b7a9b44..cff4a05 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -26,15 +26,8 @@ jobs: AUTODOC_BINDER_ENV_GH_REPO_NAME="airbus/scikit-decide" AUTODOC_BINDER_ENV_GH_BRANCH="binder" # notebooks source repo and branch depending if it is a commit push or a PR - if [[ $GITHUB_REF == refs/pull* ]]; - then - AUTODOC_NOTEBOOKS_REPO_URL="${GITHUB_SERVER_URL}/${{ github.event.pull_request.head.repo.full_name }}" - AUTODOC_NOTEBOOKS_BRANCH=${GITHUB_HEAD_REF} - elif [[ $GITHUB_REF == refs/heads* ]]; - then - AUTODOC_NOTEBOOKS_REPO_URL=${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY} - AUTODOC_NOTEBOOKS_BRANCH=${GITHUB_REF/refs\/heads\//} - fi + AUTODOC_NOTEBOOKS_REPO_URL=${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY} + AUTODOC_NOTEBOOKS_BRANCH=${GITHUB_REF/refs\/tags\//} # export in GITHUB_ENV for next steps echo "AUTODOC_BINDER_ENV_GH_REPO_NAME=${AUTODOC_BINDER_ENV_GH_REPO_NAME}" >> $GITHUB_ENV echo "AUTODOC_BINDER_ENV_GH_BRANCH=${AUTODOC_BINDER_ENV_GH_BRANCH}" >> $GITHUB_ENV @@ -56,11 +49,13 @@ jobs: run: echo ${{ github.ref }} # Runs a set of commands using the runners shell - - name: Run a multi-line script + - name: Tag binder branch run: | - echo Add other actions to build, - echo test, and deploy your project. + git fetch origin binder + BINDER_TAG="binder_${AUTODOC_NOTEBOOKS_BRANCH}" + git tag -a ${BINDER_TAG} origin/binder -m "Release binder env ${AUTODOC_NOTEBOOKS_BRANCH}" + git push origin ${BINDER_TAG} + - name: deploy if: ${{ github.ref == 'refs/heads/main' }} - run: echo deploy - + run: echo deploy \ No newline at end of file From 85ea8ab8258fdacee75f50b6c11ff8af3df512b4 Mon Sep 17 00:00:00 2001 From: Nolwen Date: Tue, 30 Nov 2021 14:44:33 +0100 Subject: [PATCH 06/60] Add identity --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cff4a05..056be1e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -53,7 +53,7 @@ jobs: run: | git fetch origin binder BINDER_TAG="binder_${AUTODOC_NOTEBOOKS_BRANCH}" - git tag -a ${BINDER_TAG} origin/binder -m "Release binder env ${AUTODOC_NOTEBOOKS_BRANCH}" + git tag -a ${BINDER_TAG} origin/binder -m "Release binder env ${AUTODOC_NOTEBOOKS_BRANCH}" --author="Binder Bot " git push origin ${BINDER_TAG} - name: deploy From 0b446271267d3bcbb0f98c78ac61d2599a103777 Mon Sep 17 00:00:00 2001 From: Nolwen Date: Tue, 30 Nov 2021 14:50:13 +0100 Subject: [PATCH 07/60] Add identity again --- .github/workflows/release.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 056be1e..c947f40 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -53,7 +53,9 @@ jobs: run: | git fetch origin binder BINDER_TAG="binder_${AUTODOC_NOTEBOOKS_BRANCH}" - git tag -a ${BINDER_TAG} origin/binder -m "Release binder env ${AUTODOC_NOTEBOOKS_BRANCH}" --author="Binder Bot " + git config user.name "Binder Bot" + git config user.email "binder@bot.com" + git tag -a ${BINDER_TAG} origin/binder -m "Release binder env ${AUTODOC_NOTEBOOKS_BRANCH}" git push origin ${BINDER_TAG} - name: deploy From 30a650287353d4e7598163f79730fdc301a51f3b Mon Sep 17 00:00:00 2001 From: Nolwen Date: Tue, 30 Nov 2021 15:20:48 +0100 Subject: [PATCH 08/60] Create binder env in a separate job --- .github/workflows/release.yml | 33 +++++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c947f40..cd86e04 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -48,16 +48,29 @@ jobs: - name: Run a one-line script run: echo ${{ github.ref }} - # Runs a set of commands using the runners shell - - name: Tag binder branch + create-binder-env: + runs-on: ubuntu-latest + steps: + - name: Get scikit-decide release version and define new binder env tag run: | - git fetch origin binder - BINDER_TAG="binder_${AUTODOC_NOTEBOOKS_BRANCH}" + SKDECIDE_VERSION=${GITHUB_REF/refs\/tags\/v/} + echo "SKDECIDE_VERSION=${SKDECIDE_VERSION}" >> $GITHUB_ENV + echo "BINDER_TAG=binder_v${SKDECIDE_VERSION}" >> $GITHUB_ENV + + # Checks-out binder branch + - uses: actions/checkout@v2 + with: + ref: binder + + - name: Define git identity + + + - name: Update scikit-decide dependency and tag the environement + run: | + sed -e "s/scikit-decide\[all\]==.*/scikit-decide\[all\]==${SKDECIDE_VERSION}/" environment.yml > environment.yml.new + mv environment.yml.new environment.yml git config user.name "Binder Bot" git config user.email "binder@bot.com" - git tag -a ${BINDER_TAG} origin/binder -m "Release binder env ${AUTODOC_NOTEBOOKS_BRANCH}" - git push origin ${BINDER_TAG} - - - name: deploy - if: ${{ github.ref == 'refs/heads/main' }} - run: echo deploy \ No newline at end of file + git commit environment.yml -m "Update scikit-decide dependency" + git tag -a ${BINDER_TAG} -m "Release binder environment for scikit-decide ${SKDECIDE_VERSION}" + git push origin ${BINDER_TAG} \ No newline at end of file From a2081120bbc4a62b9d257a3ce326f7f79e66811e Mon Sep 17 00:00:00 2001 From: Nolwen Date: Tue, 30 Nov 2021 15:24:55 +0100 Subject: [PATCH 09/60] Fix yaml --- .github/workflows/release.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cd86e04..0a4d3ea 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -62,9 +62,6 @@ jobs: with: ref: binder - - name: Define git identity - - - name: Update scikit-decide dependency and tag the environement run: | sed -e "s/scikit-decide\[all\]==.*/scikit-decide\[all\]==${SKDECIDE_VERSION}/" environment.yml > environment.yml.new From e5dd06bde88f6db13fd915ee820ad0ef66e8c888 Mon Sep 17 00:00:00 2001 From: Nolwen Date: Tue, 30 Nov 2021 15:58:46 +0100 Subject: [PATCH 10/60] Use new binder env in doc --- .github/workflows/release.yml | 68 ++++++++++++++--------------------- 1 file changed, 27 insertions(+), 41 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0a4d3ea..74c26ce 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,52 +10,16 @@ on: # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: - # This workflow contains a single job called "build" - build: - # The type of runner that the job will run on - runs-on: ubuntu-latest - - # Steps represent a sequence of tasks that will be executed as part of the job - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v2 - - - name: Set env variables for github+binder links in doc - run: | - # binder environment repo and branch - AUTODOC_BINDER_ENV_GH_REPO_NAME="airbus/scikit-decide" - AUTODOC_BINDER_ENV_GH_BRANCH="binder" - # notebooks source repo and branch depending if it is a commit push or a PR - AUTODOC_NOTEBOOKS_REPO_URL=${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY} - AUTODOC_NOTEBOOKS_BRANCH=${GITHUB_REF/refs\/tags\//} - # export in GITHUB_ENV for next steps - echo "AUTODOC_BINDER_ENV_GH_REPO_NAME=${AUTODOC_BINDER_ENV_GH_REPO_NAME}" >> $GITHUB_ENV - echo "AUTODOC_BINDER_ENV_GH_BRANCH=${AUTODOC_BINDER_ENV_GH_BRANCH}" >> $GITHUB_ENV - echo "AUTODOC_NOTEBOOKS_REPO_URL=${AUTODOC_NOTEBOOKS_REPO_URL}" >> $GITHUB_ENV - echo "AUTODOC_NOTEBOOKS_BRANCH=${AUTODOC_NOTEBOOKS_BRANCH}" >> $GITHUB_ENV - # check computed variables - echo "Binder env: ${AUTODOC_BINDER_ENV_GH_REPO_NAME}/${AUTODOC_BINDER_ENV_GH_BRANCH}" - echo "Notebooks source: ${AUTODOC_NOTEBOOKS_REPO_URL}/tree/${AUTODOC_NOTEBOOKS_BRANCH}" - - - name: read binder env - run: | - echo ${AUTODOC_BINDER_ENV_GH_REPO_NAME} - echo ${AUTODOC_BINDER_ENV_GH_BRANCH} - echo ${AUTODOC_NOTEBOOKS_REPO_URL} - echo ${AUTODOC_NOTEBOOKS_BRANCH} - - # Runs a single command using the runners shell - - name: Run a one-line script - run: echo ${{ github.ref }} - create-binder-env: runs-on: ubuntu-latest steps: - name: Get scikit-decide release version and define new binder env tag run: | - SKDECIDE_VERSION=${GITHUB_REF/refs\/tags\/v/} + TAG_NAME=${GITHUB_REF/refs\/tags\//} # stripping "refs/tags/" + SKDECIDE_VERSION=${TAG_NAME/v/} # stripping "v" + BINDER_TAG=binder_${TAG_NAME} + echo "BINDER_TAG=${BINDER_TAG}" >> $GITHUB_ENV echo "SKDECIDE_VERSION=${SKDECIDE_VERSION}" >> $GITHUB_ENV - echo "BINDER_TAG=binder_v${SKDECIDE_VERSION}" >> $GITHUB_ENV # Checks-out binder branch - uses: actions/checkout@v2 @@ -70,4 +34,26 @@ jobs: git config user.email "binder@bot.com" git commit environment.yml -m "Update scikit-decide dependency" git tag -a ${BINDER_TAG} -m "Release binder environment for scikit-decide ${SKDECIDE_VERSION}" - git push origin ${BINDER_TAG} \ No newline at end of file + git push origin ${BINDER_TAG} + + build-docs: + runs-on: ubuntu-latest + env: + DOCS_VERSION_PATH: / + + steps: + - name: Set env variables for github+binder links in doc + run: | + TAG_NAME=${GITHUB_REF/refs\/tags\//} # stripping "refs/tags/" + BINDER_TAG=binder_${TAG_NAME} + echo "AUTODOC_BINDER_ENV_GH_REPO_NAME=airbus/scikit-decide" >> $GITHUB_ENV + echo "AUTODOC_BINDER_ENV_GH_BRANCH=${BINDER_TAG}" >> $GITHUB_ENV + echo "AUTODOC_NOTEBOOKS_REPO_URL=${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}" >> $GITHUB_ENV + echo "AUTODOC_NOTEBOOKS_BRANCH=${TAG_NAME}" >> $GITHUB_ENV + + - name: read binder env + run: | + echo ${AUTODOC_BINDER_ENV_GH_REPO_NAME} + echo ${AUTODOC_BINDER_ENV_GH_BRANCH} + echo ${AUTODOC_NOTEBOOKS_REPO_URL} + echo ${AUTODOC_NOTEBOOKS_BRANCH} From 8b13114abd5058320c3ff42eb5199e47ef900c7b Mon Sep 17 00:00:00 2001 From: Nolwen Date: Tue, 30 Nov 2021 16:11:54 +0100 Subject: [PATCH 11/60] Cache binder build on mybinder.org --- .github/workflows/release.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 74c26ce..df01e63 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -36,6 +36,12 @@ jobs: git tag -a ${BINDER_TAG} -m "Release binder environment for scikit-decide ${SKDECIDE_VERSION}" git push origin ${BINDER_TAG} + - name: cache binder build on mybinder.org + uses: jupyterhub/repo2docker-action@master + with: + NO_PUSH: true + MYBINDERORG_TAG: ${BINDER_TAG} + build-docs: runs-on: ubuntu-latest env: From 9cb6e586a1e1869054f5a319e8e48a6d714dd004 Mon Sep 17 00:00:00 2001 From: Nolwen Date: Tue, 30 Nov 2021 16:47:58 +0100 Subject: [PATCH 12/60] Change the way the env var BINDER_TAG is passed --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index df01e63..f4115a2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -40,7 +40,7 @@ jobs: uses: jupyterhub/repo2docker-action@master with: NO_PUSH: true - MYBINDERORG_TAG: ${BINDER_TAG} + MYBINDERORG_TAG: ${{ BINDER_TAG }} build-docs: runs-on: ubuntu-latest From e9b7bb360b6645c55dfd6e689534771668982c79 Mon Sep 17 00:00:00 2001 From: Nolwen Date: Tue, 30 Nov 2021 17:09:43 +0100 Subject: [PATCH 13/60] Test env variable context --- .github/workflows/blank.yml | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/.github/workflows/blank.yml b/.github/workflows/blank.yml index fb0fdf9..8d17261 100644 --- a/.github/workflows/blank.yml +++ b/.github/workflows/blank.yml @@ -53,6 +53,8 @@ jobs: echo ${AUTODOC_NOTEBOOKS_REPO_URL} echo ${AUTODOC_NOTEBOOKS_BRANCH} + echo nb_branch: ${{ env.AUTODOC_NOTEBOOKS_BRANCH }} + # Runs a single command using the runners shell - name: Run a one-line script run: echo ${{ github.ref }} @@ -65,11 +67,3 @@ jobs: - name: deploy if: ${{ github.ref == 'refs/heads/main' }} run: echo deploy - - - name: tag - run: | - git branch --all - git tag - git remote - git fetch origin toto - git branch --all \ No newline at end of file From bbf13b37c7835475bfd49d9cc36eecf64cae1728 Mon Sep 17 00:00:00 2001 From: Nolwen Date: Tue, 30 Nov 2021 17:10:43 +0100 Subject: [PATCH 14/60] Use env.BINDER_TAG to reference binder env branch --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f4115a2..d60ccf2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -40,7 +40,7 @@ jobs: uses: jupyterhub/repo2docker-action@master with: NO_PUSH: true - MYBINDERORG_TAG: ${{ BINDER_TAG }} + MYBINDERORG_TAG: ${{ env.BINDER_TAG }} build-docs: runs-on: ubuntu-latest From 8cbe9137d0259dd43d781c30feeb044373ceb845 Mon Sep 17 00:00:00 2001 From: Nolwen Date: Thu, 2 Dec 2021 13:51:33 +0100 Subject: [PATCH 15/60] Build binder docker image --- .github/workflows/blank.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/blank.yml b/.github/workflows/blank.yml index 8d17261..7c685dd 100644 --- a/.github/workflows/blank.yml +++ b/.github/workflows/blank.yml @@ -67,3 +67,15 @@ jobs: - name: deploy if: ${{ github.ref == 'refs/heads/main' }} run: echo deploy + + create_binder_env: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: build docker image as used by binder + uses: jupyterhub/repo2docker-action@master + with: + NO_PUSH: true + IMAGE_NAME: "scikit-decide-binder" + - name: list docker images + run: docker image ls \ No newline at end of file From e4cedb1b6661466d16b95f9c4a1445a2cd28ddcc Mon Sep 17 00:00:00 2001 From: Nolwen Date: Fri, 3 Dec 2021 09:55:32 +0100 Subject: [PATCH 16/60] Test variables --- .github/workflows/blank.yml | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/.github/workflows/blank.yml b/.github/workflows/blank.yml index 7c685dd..a86dde6 100644 --- a/.github/workflows/blank.yml +++ b/.github/workflows/blank.yml @@ -22,6 +22,15 @@ jobs: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v2 + - name: Tests + run: | + echo $GITHUB_REF + echo ${{ github.ref }} + echo ${{ github.head_ref }} + echo ${{ github.base_ref }} + echo ${{ github.repository }} + echo $GITHUB_REPOSITORY + - name: Set env variables for github+binder links in doc run: | # binder environment repo and branch @@ -67,15 +76,3 @@ jobs: - name: deploy if: ${{ github.ref == 'refs/heads/main' }} run: echo deploy - - create_binder_env: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: build docker image as used by binder - uses: jupyterhub/repo2docker-action@master - with: - NO_PUSH: true - IMAGE_NAME: "scikit-decide-binder" - - name: list docker images - run: docker image ls \ No newline at end of file From be72a6b73cad829a2365f423a6206af25ad886d1 Mon Sep 17 00:00:00 2001 From: Nolwen Date: Fri, 3 Dec 2021 10:07:07 +0100 Subject: [PATCH 17/60] Add test --- .github/workflows/blank.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/blank.yml b/.github/workflows/blank.yml index a86dde6..0400d2a 100644 --- a/.github/workflows/blank.yml +++ b/.github/workflows/blank.yml @@ -26,6 +26,7 @@ jobs: run: | echo $GITHUB_REF echo ${{ github.ref }} + echo ${{ github.ref_name }} echo ${{ github.head_ref }} echo ${{ github.base_ref }} echo ${{ github.repository }} From d8af65f7705d0e67bed58f327063e69e12e69d75 Mon Sep 17 00:00:00 2001 From: Nolwen Date: Tue, 12 Apr 2022 11:19:41 +0200 Subject: [PATCH 18/60] Test squashing commits on gh-pages --- .github/workflows/blank.yml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/blank.yml b/.github/workflows/blank.yml index 0400d2a..d211030 100644 --- a/.github/workflows/blank.yml +++ b/.github/workflows/blank.yml @@ -20,7 +20,20 @@ jobs: # Steps represent a sequence of tasks that will be executed as part of the job steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v2 + - name: Checkout all branches + uses: actions/checkout@v2 + with: + submodules: true + fetch-depth: 0 # fetch all branches + + - name: Squash commits on gh_pages + run: | + git checkout gh-pages + git reset --soft HEAD~ + git config user.name "Actions" + git config user.email "actions@github.com" + git commit --amend -m "publish documentation for master" + git push -f origin gh-pages - name: Tests run: | From 7d0b77a01a75cf6554329e191b9355026ee1fb8d Mon Sep 17 00:00:00 2001 From: Nolwen Date: Tue, 12 Apr 2022 13:14:03 +0200 Subject: [PATCH 19/60] Squash only if second to last commit was for master doc --- .github/workflows/blank.yml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/blank.yml b/.github/workflows/blank.yml index d211030..0c87103 100644 --- a/.github/workflows/blank.yml +++ b/.github/workflows/blank.yml @@ -26,14 +26,20 @@ jobs: submodules: true fetch-depth: 0 # fetch all branches - - name: Squash commits on gh_pages + - name: Squash last master doc commits on gh_pages run: | git checkout gh-pages - git reset --soft HEAD~ - git config user.name "Actions" - git config user.email "actions@github.com" - git commit --amend -m "publish documentation for master" - git push -f origin gh-pages + # check if second to last commit was also for master doc + second_to_last_commit_title=$(git log -1 HEAD~ --format=%s) + pattern="publish documentation on master*" + if [[ second_to_last_commit_title == $pattern ]]; then + # merge last commit with previous one + git reset --soft HEAD~ + git config user.name "Actions" + git config user.email "actions@github.com" + git commit --amend -m "publish documentation for master" + git push -f origin gh-pages + fi - name: Tests run: | From ceb2e19db998040d2606f9d90d8959926314848e Mon Sep 17 00:00:00 2001 From: Nolwen Date: Tue, 12 Apr 2022 13:15:28 +0200 Subject: [PATCH 20/60] T --- .github/workflows/blank.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/blank.yml b/.github/workflows/blank.yml index 0c87103..1d48685 100644 --- a/.github/workflows/blank.yml +++ b/.github/workflows/blank.yml @@ -32,7 +32,7 @@ jobs: # check if second to last commit was also for master doc second_to_last_commit_title=$(git log -1 HEAD~ --format=%s) pattern="publish documentation on master*" - if [[ second_to_last_commit_title == $pattern ]]; then + if [[ $second_to_last_commit_title == $pattern ]]; then # merge last commit with previous one git reset --soft HEAD~ git config user.name "Actions" @@ -41,6 +41,7 @@ jobs: git push -f origin gh-pages fi + - name: Tests run: | echo $GITHUB_REF From a075103010750b69dc5eabf6d58fcc398ace9dc4 Mon Sep 17 00:00:00 2001 From: Nolwen Date: Tue, 12 Apr 2022 13:28:03 +0200 Subject: [PATCH 21/60] Fix a mistype in pattern --- .github/workflows/blank.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/blank.yml b/.github/workflows/blank.yml index 1d48685..b421795 100644 --- a/.github/workflows/blank.yml +++ b/.github/workflows/blank.yml @@ -31,7 +31,7 @@ jobs: git checkout gh-pages # check if second to last commit was also for master doc second_to_last_commit_title=$(git log -1 HEAD~ --format=%s) - pattern="publish documentation on master*" + pattern="publish documentation for master*" if [[ $second_to_last_commit_title == $pattern ]]; then # merge last commit with previous one git reset --soft HEAD~ From 63e50042163071cbcd462da7a9f2b91322789b38 Mon Sep 17 00:00:00 2001 From: Nolwen Date: Tue, 12 Apr 2022 14:02:56 +0200 Subject: [PATCH 22/60] Update release workflow to update doc with an appropriate commit msg --- .github/workflows/release.yml | 26 +++++++++----------------- doc/a | 0 doc/b | 0 doc/c | 0 4 files changed, 9 insertions(+), 17 deletions(-) create mode 100644 doc/a create mode 100644 doc/b create mode 100644 doc/c diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d60ccf2..7ea876b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,27 +20,19 @@ jobs: BINDER_TAG=binder_${TAG_NAME} echo "BINDER_TAG=${BINDER_TAG}" >> $GITHUB_ENV echo "SKDECIDE_VERSION=${SKDECIDE_VERSION}" >> $GITHUB_ENV + echo "DOCS_VERSION_PATH=/version/$SKDECIDE_VERSION/" >> $GITHUB_ENV - # Checks-out binder branch + # Checks-out current branch - uses: actions/checkout@v2 - with: - ref: binder - - - name: Update scikit-decide dependency and tag the environement - run: | - sed -e "s/scikit-decide\[all\]==.*/scikit-decide\[all\]==${SKDECIDE_VERSION}/" environment.yml > environment.yml.new - mv environment.yml.new environment.yml - git config user.name "Binder Bot" - git config user.email "binder@bot.com" - git commit environment.yml -m "Update scikit-decide dependency" - git tag -a ${BINDER_TAG} -m "Release binder environment for scikit-decide ${SKDECIDE_VERSION}" - git push origin ${BINDER_TAG} - - name: cache binder build on mybinder.org - uses: jupyterhub/repo2docker-action@master + - name: Deploy 🚀 + uses: JamesIves/github-pages-deploy-action@4.1.5 with: - NO_PUSH: true - MYBINDERORG_TAG: ${{ env.BINDER_TAG }} + branch: gh-pages # The branch the action should deploy to. + folder: doc # The folder the action should deploy. + target-folder: ${{ env.DOCS_VERSION_PATH }} # The folder the action should deploy to. + commit-message: publish documentation for release ${{ env.SKDECIDE_VERSION }} + clean: false # Releasing a new version is about creating a new directory, so we don't want to clean up the root. build-docs: runs-on: ubuntu-latest diff --git a/doc/a b/doc/a new file mode 100644 index 0000000..e69de29 diff --git a/doc/b b/doc/b new file mode 100644 index 0000000..e69de29 diff --git a/doc/c b/doc/c new file mode 100644 index 0000000..e69de29 From e8fd7870a1f4bb6a266998f9aedbe9e374740c60 Mon Sep 17 00:00:00 2001 From: Nolwen Date: Tue, 12 Apr 2022 14:11:47 +0200 Subject: [PATCH 23/60] Deploy master doc --- .github/workflows/blank.yml | 10 ++++++++++ doc/masterreadme.md | 0 2 files changed, 10 insertions(+) create mode 100644 doc/masterreadme.md diff --git a/.github/workflows/blank.yml b/.github/workflows/blank.yml index b421795..078d78d 100644 --- a/.github/workflows/blank.yml +++ b/.github/workflows/blank.yml @@ -26,6 +26,16 @@ jobs: submodules: true fetch-depth: 0 # fetch all branches + - name: Deploy documentation in root folder on GH pages 🚀 + uses: JamesIves/github-pages-deploy-action@4.1.5 + with: + branch: gh-pages # The branch the action should deploy to. + folder: doc # The folder the action should deploy. + target-folder: / # The folder the action should deploy to. + commit-message: publish documentation for master + clean-exclude: | + "version/*" + - name: Squash last master doc commits on gh_pages run: | git checkout gh-pages diff --git a/doc/masterreadme.md b/doc/masterreadme.md new file mode 100644 index 0000000..e69de29 From 4763bbb25924818805eb4681763f951a47f02b22 Mon Sep 17 00:00:00 2001 From: Nolwen Date: Tue, 12 Apr 2022 14:23:26 +0200 Subject: [PATCH 24/60] Add a print --- .github/workflows/blank.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/blank.yml b/.github/workflows/blank.yml index 078d78d..32e45f7 100644 --- a/.github/workflows/blank.yml +++ b/.github/workflows/blank.yml @@ -43,6 +43,7 @@ jobs: second_to_last_commit_title=$(git log -1 HEAD~ --format=%s) pattern="publish documentation for master*" if [[ $second_to_last_commit_title == $pattern ]]; then + echo "merge two last commits" # merge last commit with previous one git reset --soft HEAD~ git config user.name "Actions" From 8ea9487da6bc1ba6a42037371bcd15f2c2968406 Mon Sep 17 00:00:00 2001 From: Nolwen Date: Tue, 12 Apr 2022 14:24:34 +0200 Subject: [PATCH 25/60] Change options order --- .github/workflows/blank.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/blank.yml b/.github/workflows/blank.yml index 32e45f7..b5fdb16 100644 --- a/.github/workflows/blank.yml +++ b/.github/workflows/blank.yml @@ -40,7 +40,7 @@ jobs: run: | git checkout gh-pages # check if second to last commit was also for master doc - second_to_last_commit_title=$(git log -1 HEAD~ --format=%s) + second_to_last_commit_title=$(git log HEAD~ -- -1--format=%s) pattern="publish documentation for master*" if [[ $second_to_last_commit_title == $pattern ]]; then echo "merge two last commits" From 2cf2033ca353aa0db0ebe86af44a42c2ee27c2c1 Mon Sep 17 00:00:00 2001 From: Nolwen Date: Tue, 12 Apr 2022 14:25:38 +0200 Subject: [PATCH 26/60] Show log --- .github/workflows/blank.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/blank.yml b/.github/workflows/blank.yml index b5fdb16..64b407c 100644 --- a/.github/workflows/blank.yml +++ b/.github/workflows/blank.yml @@ -39,8 +39,9 @@ jobs: - name: Squash last master doc commits on gh_pages run: | git checkout gh-pages + git log HEAD -- -2 --format=%s # check if second to last commit was also for master doc - second_to_last_commit_title=$(git log HEAD~ -- -1--format=%s) + second_to_last_commit_title=$(git log HEAD~ -- -1 --format=%s) pattern="publish documentation for master*" if [[ $second_to_last_commit_title == $pattern ]]; then echo "merge two last commits" From 43119fb4d5ec8ad36a737b1dd451b2902d38c1bc Mon Sep 17 00:00:00 2001 From: Nolwen Date: Tue, 12 Apr 2022 14:27:52 +0200 Subject: [PATCH 27/60] fix bug --- .github/workflows/blank.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/blank.yml b/.github/workflows/blank.yml index 64b407c..7824b12 100644 --- a/.github/workflows/blank.yml +++ b/.github/workflows/blank.yml @@ -39,9 +39,9 @@ jobs: - name: Squash last master doc commits on gh_pages run: | git checkout gh-pages - git log HEAD -- -2 --format=%s + git log HEAD -2 --format=%s # check if second to last commit was also for master doc - second_to_last_commit_title=$(git log HEAD~ -- -1 --format=%s) + second_to_last_commit_title=$(git log HEAD~ -1 --format=%s) pattern="publish documentation for master*" if [[ $second_to_last_commit_title == $pattern ]]; then echo "merge two last commits" From 5561509c8e6311429405c136bfdb9871ad21542e Mon Sep 17 00:00:00 2001 From: Nolwen Date: Tue, 12 Apr 2022 14:31:36 +0200 Subject: [PATCH 28/60] Add a file --- doc/anpother | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 doc/anpother diff --git a/doc/anpother b/doc/anpother new file mode 100644 index 0000000..e69de29 From fed3cc2b865e9bb17dae288aebc67c0ecb5d73af Mon Sep 17 00:00:00 2001 From: Nolwen Date: Tue, 12 Apr 2022 14:35:31 +0200 Subject: [PATCH 29/60] Reset to origin/gh-pages before anything else --- .github/workflows/blank.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/blank.yml b/.github/workflows/blank.yml index 7824b12..96bd936 100644 --- a/.github/workflows/blank.yml +++ b/.github/workflows/blank.yml @@ -39,6 +39,7 @@ jobs: - name: Squash last master doc commits on gh_pages run: | git checkout gh-pages + git reset --hard origin/gh-pages git log HEAD -2 --format=%s # check if second to last commit was also for master doc second_to_last_commit_title=$(git log HEAD~ -1 --format=%s) From 9ec5a344f59c9816e5546553a160fec3273638f6 Mon Sep 17 00:00:00 2001 From: Nolwen Date: Tue, 12 Apr 2022 14:37:51 +0200 Subject: [PATCH 30/60] dmjhv --- .github/workflows/blank.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/blank.yml b/.github/workflows/blank.yml index 96bd936..df85b8a 100644 --- a/.github/workflows/blank.yml +++ b/.github/workflows/blank.yml @@ -39,10 +39,13 @@ jobs: - name: Squash last master doc commits on gh_pages run: | git checkout gh-pages + echo checkout ok git reset --hard origin/gh-pages git log HEAD -2 --format=%s + echo git log done # check if second to last commit was also for master doc - second_to_last_commit_title=$(git log HEAD~ -1 --format=%s) + second_to_last_commit_title=$(git log HEAD~1 -1 --format=%s) + echo $second_to_last_commit_title pattern="publish documentation for master*" if [[ $second_to_last_commit_title == $pattern ]]; then echo "merge two last commits" From 459b5c9225a17547d60cd67f836813e82a7b05cb Mon Sep 17 00:00:00 2001 From: Nolwen Date: Tue, 12 Apr 2022 14:43:55 +0200 Subject: [PATCH 31/60] dmjhvq --- .github/workflows/blank.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/blank.yml b/.github/workflows/blank.yml index df85b8a..2eb7119 100644 --- a/.github/workflows/blank.yml +++ b/.github/workflows/blank.yml @@ -41,10 +41,15 @@ jobs: git checkout gh-pages echo checkout ok git reset --hard origin/gh-pages - git log HEAD -2 --format=%s + echo reset + git log echo git log done + git log -2 --format=%s + echo git log with format done + git log HEAD -2 --format=%s + echo git log HEAD done # check if second to last commit was also for master doc - second_to_last_commit_title=$(git log HEAD~1 -1 --format=%s) + second_to_last_commit_title=$(git log HEAD\~1 -1 --format=%s) echo $second_to_last_commit_title pattern="publish documentation for master*" if [[ $second_to_last_commit_title == $pattern ]]; then From 0dfd52d1f6ab780a9a2fddff78724ec3ec150f5f Mon Sep 17 00:00:00 2001 From: Nolwen Date: Tue, 12 Apr 2022 14:53:00 +0200 Subject: [PATCH 32/60] Add another checkout step --- .github/workflows/blank.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/blank.yml b/.github/workflows/blank.yml index 2eb7119..7184c2c 100644 --- a/.github/workflows/blank.yml +++ b/.github/workflows/blank.yml @@ -36,6 +36,12 @@ jobs: clean-exclude: | "version/*" + - name: Checkout all branches + uses: actions/checkout@v2 + with: + submodules: true + fetch-depth: 0 # fetch all branches + - name: Squash last master doc commits on gh_pages run: | git checkout gh-pages From 5ce70394acca59ce80147fceb5c78cc225641c25 Mon Sep 17 00:00:00 2001 From: Nolwen Date: Tue, 12 Apr 2022 15:02:25 +0200 Subject: [PATCH 33/60] Remove useless prints --- .github/workflows/blank.yml | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/.github/workflows/blank.yml b/.github/workflows/blank.yml index 7184c2c..649cda3 100644 --- a/.github/workflows/blank.yml +++ b/.github/workflows/blank.yml @@ -45,17 +45,8 @@ jobs: - name: Squash last master doc commits on gh_pages run: | git checkout gh-pages - echo checkout ok - git reset --hard origin/gh-pages - echo reset - git log - echo git log done - git log -2 --format=%s - echo git log with format done - git log HEAD -2 --format=%s - echo git log HEAD done # check if second to last commit was also for master doc - second_to_last_commit_title=$(git log HEAD\~1 -1 --format=%s) + second_to_last_commit_title=$(git log HEAD~1 -1 --format=%s) echo $second_to_last_commit_title pattern="publish documentation for master*" if [[ $second_to_last_commit_title == $pattern ]]; then From 9171e96de5e72f388b6984efd6078335982dcdec Mon Sep 17 00:00:00 2001 From: Nolwen Date: Tue, 12 Apr 2022 15:09:03 +0200 Subject: [PATCH 34/60] Add a new file to docs --- doc/newone | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 doc/newone diff --git a/doc/newone b/doc/newone new file mode 100644 index 0000000..e69de29 From a63c5177bd18786af645d679691ea976509e16b0 Mon Sep 17 00:00:00 2001 From: Nolwen Date: Tue, 12 Apr 2022 15:29:51 +0200 Subject: [PATCH 35/60] Check rather that 2 last commits titles match --- .github/workflows/blank.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/blank.yml b/.github/workflows/blank.yml index 649cda3..75893a5 100644 --- a/.github/workflows/blank.yml +++ b/.github/workflows/blank.yml @@ -45,13 +45,12 @@ jobs: - name: Squash last master doc commits on gh_pages run: | git checkout gh-pages - # check if second to last commit was also for master doc + # check if two last commits are for same doc + last_commit_title=$(git log HEAD -1 --format=%s) second_to_last_commit_title=$(git log HEAD~1 -1 --format=%s) - echo $second_to_last_commit_title - pattern="publish documentation for master*" - if [[ $second_to_last_commit_title == $pattern ]]; then - echo "merge two last commits" - # merge last commit with previous one + echo $last_commit_title $second_to_last_commit_title + if [[ $last_commit_title == $second_to_last_commit_title ]]; then + echo "Merge two last commits" git reset --soft HEAD~ git config user.name "Actions" git config user.email "actions@github.com" From b18e3da33e456edc3c89f28ff9e33364bb563e5b Mon Sep 17 00:00:00 2001 From: Nolwen Date: Tue, 12 Apr 2022 15:42:17 +0200 Subject: [PATCH 36/60] modify master doc at each push --- .github/workflows/blank.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/blank.yml b/.github/workflows/blank.yml index 75893a5..e80b70b 100644 --- a/.github/workflows/blank.yml +++ b/.github/workflows/blank.yml @@ -26,6 +26,10 @@ jobs: submodules: true fetch-depth: 0 # fetch all branches + - name: build master doc (fake it by appending a word) + run: | + echo "\nyo" >> doc/yo.md + - name: Deploy documentation in root folder on GH pages 🚀 uses: JamesIves/github-pages-deploy-action@4.1.5 with: @@ -48,7 +52,8 @@ jobs: # check if two last commits are for same doc last_commit_title=$(git log HEAD -1 --format=%s) second_to_last_commit_title=$(git log HEAD~1 -1 --format=%s) - echo $last_commit_title $second_to_last_commit_title + echo $last_commit_title + echo $second_to_last_commit_title if [[ $last_commit_title == $second_to_last_commit_title ]]; then echo "Merge two last commits" git reset --soft HEAD~ From 86e279479a215bba2762c044602999c06981559e Mon Sep 17 00:00:00 2001 From: Nolwen Date: Tue, 12 Apr 2022 16:07:43 +0200 Subject: [PATCH 37/60] add first version of yo.md --- doc/yo.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 doc/yo.md diff --git a/doc/yo.md b/doc/yo.md new file mode 100644 index 0000000..e69de29 From 77d2420b89e3b756fdfa16d1dff2e05b8e678dfb Mon Sep 17 00:00:00 2001 From: Nolwen Date: Tue, 12 Apr 2022 16:11:24 +0200 Subject: [PATCH 38/60] Update build doc --- .github/workflows/blank.yml | 5 +++-- doc/yo.md | 3 +++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/blank.yml b/.github/workflows/blank.yml index e80b70b..9ffca20 100644 --- a/.github/workflows/blank.yml +++ b/.github/workflows/blank.yml @@ -28,8 +28,9 @@ jobs: - name: build master doc (fake it by appending a word) run: | - echo "\nyo" >> doc/yo.md - + git show origin/gh-pages:yo.md > doc/yo.md + echo "yo" >> doc/yo.md + - name: Deploy documentation in root folder on GH pages 🚀 uses: JamesIves/github-pages-deploy-action@4.1.5 with: diff --git a/doc/yo.md b/doc/yo.md index e69de29..a5e03e6 100644 --- a/doc/yo.md +++ b/doc/yo.md @@ -0,0 +1,3 @@ +\nyo +\nyo +yo From 9c15729f81b0d4b2177a6bf9c9099c95eba4a6ec Mon Sep 17 00:00:00 2001 From: Nolwen Date: Tue, 12 Apr 2022 19:51:50 +0200 Subject: [PATCH 39/60] Use last commit message --- .github/workflows/blank.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/blank.yml b/.github/workflows/blank.yml index 9ffca20..9d80c54 100644 --- a/.github/workflows/blank.yml +++ b/.github/workflows/blank.yml @@ -60,7 +60,7 @@ jobs: git reset --soft HEAD~ git config user.name "Actions" git config user.email "actions@github.com" - git commit --amend -m "publish documentation for master" + git commit --amend --no-edit git push -f origin gh-pages fi From e3a40e17bdf00f3bce59b1a66683948badad86a0 Mon Sep 17 00:00:00 2001 From: Nolwen Date: Mon, 30 May 2022 10:22:39 +0200 Subject: [PATCH 40/60] Test python setup with env var --- .github/workflows/blank.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/blank.yml b/.github/workflows/blank.yml index 9d80c54..9d8951a 100644 --- a/.github/workflows/blank.yml +++ b/.github/workflows/blank.yml @@ -16,10 +16,17 @@ jobs: build: # The type of runner that the job will run on runs-on: ubuntu-latest - + env: + python_version: "3.7" # Steps represent a sequence of tasks that will be executed as part of the job steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - name: Setup python + uses: actions/setup-python@v2 + with: + python-version: ${{ env.python_version }} + - name: Test python + run: python --version - name: Checkout all branches uses: actions/checkout@v2 with: From 0938e329ae9f8f55da66b18971ed1f4a8c8db59f Mon Sep 17 00:00:00 2001 From: Nolwen Date: Thu, 23 Jun 2022 15:43:36 +0200 Subject: [PATCH 41/60] Test matrix --- .github/workflows/blank.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/workflows/blank.yml b/.github/workflows/blank.yml index 9d8951a..6a8435d 100644 --- a/.github/workflows/blank.yml +++ b/.github/workflows/blank.yml @@ -12,6 +12,23 @@ on: # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: + matrix-testing: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + os: [ "ubuntu-latest", "macos-latest"] + python-version: [ "3.7", "3.8"] + include: + - os: "ubuntu-latest" + minizinc_path: $(pwd)/bin + - os: "macos-latest" + minizinc_path: $(pwd)/bin/MiniZincIDE.app/Contents/Resources + - color: "green" + color-details: "green like a big apple" + steps: + - name: on teste la matrice + run: echo ${{ matrix }} # This workflow contains a single job called "build" build: # The type of runner that the job will run on From 0de7512d89d6b9d810a8b8c3a04fcf6056d15330 Mon Sep 17 00:00:00 2001 From: Nolwen Date: Thu, 23 Jun 2022 15:47:42 +0200 Subject: [PATCH 42/60] more colors --- .github/workflows/blank.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/blank.yml b/.github/workflows/blank.yml index 6a8435d..5e105b7 100644 --- a/.github/workflows/blank.yml +++ b/.github/workflows/blank.yml @@ -26,9 +26,13 @@ jobs: minizinc_path: $(pwd)/bin/MiniZincIDE.app/Contents/Resources - color: "green" color-details: "green like a big apple" + - color: "blue" + color-details: "like the sky" steps: - name: on teste la matrice - run: echo ${{ matrix }} + run: | + echo ${{ matrix.color }} + echo ${{ matrix.color-details }} # This workflow contains a single job called "build" build: # The type of runner that the job will run on From b7384fd85e53df9c30505db4799a52183af0eb5b Mon Sep 17 00:00:00 2001 From: Nolwen Date: Thu, 23 Jun 2022 15:48:56 +0200 Subject: [PATCH 43/60] Remove conditional workflows --- .github/workflows/workflow2.yml | 26 -------------------------- .github/workflows/workflow3.yml | 32 -------------------------------- 2 files changed, 58 deletions(-) delete mode 100644 .github/workflows/workflow2.yml delete mode 100644 .github/workflows/workflow3.yml diff --git a/.github/workflows/workflow2.yml b/.github/workflows/workflow2.yml deleted file mode 100644 index e8a1cf6..0000000 --- a/.github/workflows/workflow2.yml +++ /dev/null @@ -1,26 +0,0 @@ -# This is a basic workflow to help you get started with Actions - -name: workflow 2 - -# Controls when the workflow will run -on: - workflow_run: - workflows: - - CI 🔨 - types: - - completed - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - -# A workflow run is made up of one or more jobs that can run sequentially or in parallel -jobs: - # This workflow contains a single job called "build" - build: - # The type of runner that the job will run on - runs-on: ubuntu-latest - - # Steps represent a sequence of tasks that will be executed as part of the job - steps: - # Runs a single command using the runners shell - - name: Run a one-line script - run: echo "workflow 2 working!" diff --git a/.github/workflows/workflow3.yml b/.github/workflows/workflow3.yml deleted file mode 100644 index 10b2973..0000000 --- a/.github/workflows/workflow3.yml +++ /dev/null @@ -1,32 +0,0 @@ -# This is a basic workflow to help you get started with Actions - -name: workflow 3 - -# Controls when the workflow will run -on: - workflow_run: - workflows: - - CI 🔨 - types: - - completed - - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - -# A workflow run is made up of one or more jobs that can run sequentially or in parallel -jobs: - # This workflow contains a single job called "build" - build: - if: ${{ github.event.workflow_run.conclusion == 'success' }} - # The type of runner that the job will run on - runs-on: ubuntu-latest - - # Steps represent a sequence of tasks that will be executed as part of the job - steps: - - uses: actions/checkout@v2 - # Runs a single command using the runners shell - - name: Run a one-line script - run: echo "workflow 3 working on other branch!" - - name: only on main - run: echo "only on main branch" - if: ${{ github.event.workflow_run.head_branch == 'main' }} \ No newline at end of file From 896806990386f9d96e5d41156ad707232ed37d52 Mon Sep 17 00:00:00 2001 From: Nolwen Date: Thu, 23 Jun 2022 15:52:14 +0200 Subject: [PATCH 44/60] List colors beforehand --- .github/workflows/blank.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/blank.yml b/.github/workflows/blank.yml index 5e105b7..96e4bf4 100644 --- a/.github/workflows/blank.yml +++ b/.github/workflows/blank.yml @@ -19,6 +19,7 @@ jobs: matrix: os: [ "ubuntu-latest", "macos-latest"] python-version: [ "3.7", "3.8"] + color: ["green", "blue"] include: - os: "ubuntu-latest" minizinc_path: $(pwd)/bin From aaf163b5a1c13d39c7c4f5a6a5b1e8d2ebd258e6 Mon Sep 17 00:00:00 2001 From: Nolwen Date: Thu, 30 Jun 2022 10:56:24 +0200 Subject: [PATCH 45/60] Add one more element --- .github/workflows/blank.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/blank.yml b/.github/workflows/blank.yml index 96e4bf4..869df0c 100644 --- a/.github/workflows/blank.yml +++ b/.github/workflows/blank.yml @@ -29,10 +29,14 @@ jobs: color-details: "green like a big apple" - color: "blue" color-details: "like the sky" + - os: "ubuntu-latest" + color: "green" + color-details: "green like a big apple" steps: - name: on teste la matrice run: | echo ${{ matrix.color }} + echo ${{ matrix.minizinc_path }} echo ${{ matrix.color-details }} # This workflow contains a single job called "build" build: From bca7374b43aac54e7e6adb844385fe45ee059c4f Mon Sep 17 00:00:00 2001 From: Nolwen Date: Thu, 30 Jun 2022 10:58:34 +0200 Subject: [PATCH 46/60] Add a green ubuntu (not listing green in main matrix def) --- .github/workflows/blank.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/blank.yml b/.github/workflows/blank.yml index 869df0c..6a00e2a 100644 --- a/.github/workflows/blank.yml +++ b/.github/workflows/blank.yml @@ -19,7 +19,7 @@ jobs: matrix: os: [ "ubuntu-latest", "macos-latest"] python-version: [ "3.7", "3.8"] - color: ["green", "blue"] +# color: ["green", "blue"] include: - os: "ubuntu-latest" minizinc_path: $(pwd)/bin @@ -30,6 +30,7 @@ jobs: - color: "blue" color-details: "like the sky" - os: "ubuntu-latest" + python-version: "3.7" color: "green" color-details: "green like a big apple" steps: From b5be4c5c847a67a31d07d3e4cf544f2072c4113a Mon Sep 17 00:00:00 2001 From: Nolwen Date: Thu, 30 Jun 2022 11:01:17 +0200 Subject: [PATCH 47/60] Try having blue & green for ubuntu 3.7 --- .github/workflows/blank.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/blank.yml b/.github/workflows/blank.yml index 6a00e2a..a9ca751 100644 --- a/.github/workflows/blank.yml +++ b/.github/workflows/blank.yml @@ -31,8 +31,8 @@ jobs: color-details: "like the sky" - os: "ubuntu-latest" python-version: "3.7" - color: "green" - color-details: "green like a big apple" + color: ["blue", "green"] + steps: - name: on teste la matrice run: | From 432b52d22b0d26b1bbbace7ad24b1ffdadeb55cc Mon Sep 17 00:00:00 2001 From: Nolwen Date: Thu, 30 Jun 2022 11:12:25 +0200 Subject: [PATCH 48/60] Another tryin adding green --- .github/workflows/blank.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/blank.yml b/.github/workflows/blank.yml index a9ca751..98ad137 100644 --- a/.github/workflows/blank.yml +++ b/.github/workflows/blank.yml @@ -19,20 +19,20 @@ jobs: matrix: os: [ "ubuntu-latest", "macos-latest"] python-version: [ "3.7", "3.8"] -# color: ["green", "blue"] + color: ["blue"] include: - os: "ubuntu-latest" minizinc_path: $(pwd)/bin - os: "macos-latest" minizinc_path: $(pwd)/bin/MiniZincIDE.app/Contents/Resources - - color: "green" - color-details: "green like a big apple" - color: "blue" color-details: "like the sky" - os: "ubuntu-latest" python-version: "3.7" - color: ["blue", "green"] - + color: "green" + color-details: "green like a big apple" + + steps: - name: on teste la matrice run: | From b1fc49d915d867be53353eb62189745165c7ead1 Mon Sep 17 00:00:00 2001 From: Nolwen Date: Thu, 30 Jun 2022 11:13:50 +0200 Subject: [PATCH 49/60] Change orderwq --- .github/workflows/blank.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/blank.yml b/.github/workflows/blank.yml index 98ad137..924f529 100644 --- a/.github/workflows/blank.yml +++ b/.github/workflows/blank.yml @@ -21,16 +21,16 @@ jobs: python-version: [ "3.7", "3.8"] color: ["blue"] include: + - os: "ubuntu-latest" + python-version: "3.7" + color: "green" + color-details: "green like a big apple" - os: "ubuntu-latest" minizinc_path: $(pwd)/bin - os: "macos-latest" minizinc_path: $(pwd)/bin/MiniZincIDE.app/Contents/Resources - color: "blue" color-details: "like the sky" - - os: "ubuntu-latest" - python-version: "3.7" - color: "green" - color-details: "green like a big apple" steps: From 8bac46a08ad0fed770fa53b1425281e0a55f3159 Mon Sep 17 00:00:00 2001 From: Nolwen Date: Thu, 30 Jun 2022 11:18:33 +0200 Subject: [PATCH 50/60] color-> gurobi --- .github/workflows/blank.yml | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/.github/workflows/blank.yml b/.github/workflows/blank.yml index 924f529..ca8c2f8 100644 --- a/.github/workflows/blank.yml +++ b/.github/workflows/blank.yml @@ -19,26 +19,29 @@ jobs: matrix: os: [ "ubuntu-latest", "macos-latest"] python-version: [ "3.7", "3.8"] - color: ["blue"] + gurobi: "" include: - - os: "ubuntu-latest" - python-version: "3.7" - color: "green" - color-details: "green like a big apple" - os: "ubuntu-latest" minizinc_path: $(pwd)/bin - os: "macos-latest" minizinc_path: $(pwd)/bin/MiniZincIDE.app/Contents/Resources - - color: "blue" - color-details: "like the sky" - + - os: "ubuntu-latest" + python-version: "3.7" + minizinc_path: $(pwd)/bin + gurobi: "without gurobi" steps: - name: on teste la matrice run: | - echo ${{ matrix.color }} + echo ${{ matrix.gurobi }} echo ${{ matrix.minizinc_path }} echo ${{ matrix.color-details }} + - name: on teste la matrice avec python + shell: python + run: | + print("${{ matrix.gurobi }}") + print("${{ matrix.minizinc_path }}") + print("${{ matrix.color-details }}") # This workflow contains a single job called "build" build: # The type of runner that the job will run on From 7e69cbc243918d1e93db5651978b52090b97c16c Mon Sep 17 00:00:00 2001 From: Nolwen Date: Thu, 30 Jun 2022 11:19:20 +0200 Subject: [PATCH 51/60] color-> gurobi corrected --- .github/workflows/blank.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/blank.yml b/.github/workflows/blank.yml index ca8c2f8..e48a635 100644 --- a/.github/workflows/blank.yml +++ b/.github/workflows/blank.yml @@ -19,7 +19,7 @@ jobs: matrix: os: [ "ubuntu-latest", "macos-latest"] python-version: [ "3.7", "3.8"] - gurobi: "" + gurobi: [""] include: - os: "ubuntu-latest" minizinc_path: $(pwd)/bin From 4bfaf7a1bdaae9b41459e4c59203df8b09dd8ded Mon Sep 17 00:00:00 2001 From: Nolwen Date: Thu, 30 Jun 2022 11:21:48 +0200 Subject: [PATCH 52/60] color-> gurobi bool --- .github/workflows/blank.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/blank.yml b/.github/workflows/blank.yml index e48a635..f2da837 100644 --- a/.github/workflows/blank.yml +++ b/.github/workflows/blank.yml @@ -19,7 +19,7 @@ jobs: matrix: os: [ "ubuntu-latest", "macos-latest"] python-version: [ "3.7", "3.8"] - gurobi: [""] + wo_gurobi: [false] include: - os: "ubuntu-latest" minizinc_path: $(pwd)/bin @@ -28,7 +28,7 @@ jobs: - os: "ubuntu-latest" python-version: "3.7" minizinc_path: $(pwd)/bin - gurobi: "without gurobi" + gurobi: true steps: - name: on teste la matrice From 0a3b9fbd2398e7555948f4248acd956d0cf5dbba Mon Sep 17 00:00:00 2001 From: Nolwen Date: Thu, 30 Jun 2022 11:22:54 +0200 Subject: [PATCH 53/60] wo_gurobi bool --- .github/workflows/blank.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/blank.yml b/.github/workflows/blank.yml index f2da837..e88b1bf 100644 --- a/.github/workflows/blank.yml +++ b/.github/workflows/blank.yml @@ -28,18 +28,18 @@ jobs: - os: "ubuntu-latest" python-version: "3.7" minizinc_path: $(pwd)/bin - gurobi: true + wo_gurobi: true steps: - name: on teste la matrice run: | - echo ${{ matrix.gurobi }} + echo ${{ matrix.wo_gurobi }} echo ${{ matrix.minizinc_path }} echo ${{ matrix.color-details }} - name: on teste la matrice avec python shell: python run: | - print("${{ matrix.gurobi }}") + print("${{ matrix.wo_gurobi }}") print("${{ matrix.minizinc_path }}") print("${{ matrix.color-details }}") # This workflow contains a single job called "build" From 8fd48dd37f97889f5b8afb143e6667cd3a99ec0c Mon Sep 17 00:00:00 2001 From: Nolwen Date: Thu, 30 Jun 2022 11:23:53 +0200 Subject: [PATCH 54/60] wo_gurobi str --- .github/workflows/blank.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/blank.yml b/.github/workflows/blank.yml index e88b1bf..8aba5ad 100644 --- a/.github/workflows/blank.yml +++ b/.github/workflows/blank.yml @@ -19,7 +19,7 @@ jobs: matrix: os: [ "ubuntu-latest", "macos-latest"] python-version: [ "3.7", "3.8"] - wo_gurobi: [false] + wo_gurobi: [""] include: - os: "ubuntu-latest" minizinc_path: $(pwd)/bin @@ -27,8 +27,8 @@ jobs: minizinc_path: $(pwd)/bin/MiniZincIDE.app/Contents/Resources - os: "ubuntu-latest" python-version: "3.7" + wo_gurobi: "without gurobi" minizinc_path: $(pwd)/bin - wo_gurobi: true steps: - name: on teste la matrice From c811930ba53cadeda2f361a299b51e82f0ac6e08 Mon Sep 17 00:00:00 2001 From: Nolwen Date: Thu, 30 Jun 2022 11:28:08 +0200 Subject: [PATCH 55/60] use exclude --- .github/workflows/blank.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/blank.yml b/.github/workflows/blank.yml index 8aba5ad..74c65a3 100644 --- a/.github/workflows/blank.yml +++ b/.github/workflows/blank.yml @@ -18,17 +18,22 @@ jobs: fail-fast: false matrix: os: [ "ubuntu-latest", "macos-latest"] - python-version: [ "3.7", "3.8"] - wo_gurobi: [""] + python-version: [ "3.7", "3.8", "3.9"] + wo_gurobi: ["", "without gurobi"] include: - os: "ubuntu-latest" minizinc_path: $(pwd)/bin - os: "macos-latest" minizinc_path: $(pwd)/bin/MiniZincIDE.app/Contents/Resources + exclude: + - os: "macos-latest" + wo_gurobi: "without gurobi" - os: "ubuntu-latest" - python-version: "3.7" wo_gurobi: "without gurobi" - minizinc_path: $(pwd)/bin + python-version: 3.7 + - os: "ubuntu-latest" + wo_gurobi: "without gurobi" + python-version: 3.8 steps: - name: on teste la matrice From 8114ef3f7a24fef08c4e28bf9a95d2791eabcece Mon Sep 17 00:00:00 2001 From: Nolwen Date: Thu, 30 Jun 2022 11:33:54 +0200 Subject: [PATCH 56/60] conditional pip install --- .github/workflows/blank.yml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/blank.yml b/.github/workflows/blank.yml index 74c65a3..e1c8501 100644 --- a/.github/workflows/blank.yml +++ b/.github/workflows/blank.yml @@ -40,13 +40,11 @@ jobs: run: | echo ${{ matrix.wo_gurobi }} echo ${{ matrix.minizinc_path }} - echo ${{ matrix.color-details }} - - name: on teste la matrice avec python - shell: python - run: | - print("${{ matrix.wo_gurobi }}") - print("${{ matrix.minizinc_path }}") - print("${{ matrix.color-details }}") + if [ "${{ matrix.wo_gurobi }}" = "without gurobi" ]; then + echo pip install gurobipy + fi + + # This workflow contains a single job called "build" build: # The type of runner that the job will run on From b82a5d3535d4ae1d87a1f8a1815b913c4bc7c0b0 Mon Sep 17 00:00:00 2001 From: Nolwen <–huet@imacs.polytechnique.fr> Date: Fri, 1 Jul 2022 13:43:39 +0200 Subject: [PATCH 57/60] coverage report --- .github/workflows/blank.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/blank.yml b/.github/workflows/blank.yml index e1c8501..cfba2f6 100644 --- a/.github/workflows/blank.yml +++ b/.github/workflows/blank.yml @@ -25,6 +25,11 @@ jobs: minizinc_path: $(pwd)/bin - os: "macos-latest" minizinc_path: $(pwd)/bin/MiniZincIDE.app/Contents/Resources + - coverage: False + - os: "ubuntu-latest" + python-version: "3.9" + wo_gurobi: "" + coverage: True exclude: - os: "macos-latest" wo_gurobi: "without gurobi" @@ -43,7 +48,10 @@ jobs: if [ "${{ matrix.wo_gurobi }}" = "without gurobi" ]; then echo pip install gurobipy fi - + echo ${{ matrix.coverage }} + if ${{ matrix.coverage }}; then + echo "Add a coverage report" + fi # This workflow contains a single job called "build" build: From 6668c9b46842720f9ff22ee1f5d7f06107a70d49 Mon Sep 17 00:00:00 2001 From: Nolwen <–huet@imacs.polytechnique.fr> Date: Fri, 1 Jul 2022 13:47:53 +0200 Subject: [PATCH 58/60] cahnge pytest according to coverage --- .github/workflows/blank.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/blank.yml b/.github/workflows/blank.yml index cfba2f6..eaf0487 100644 --- a/.github/workflows/blank.yml +++ b/.github/workflows/blank.yml @@ -25,11 +25,11 @@ jobs: minizinc_path: $(pwd)/bin - os: "macos-latest" minizinc_path: $(pwd)/bin/MiniZincIDE.app/Contents/Resources - - coverage: False + - coverage: false - os: "ubuntu-latest" python-version: "3.9" wo_gurobi: "" - coverage: True + coverage: true exclude: - os: "macos-latest" wo_gurobi: "without gurobi" @@ -52,6 +52,12 @@ jobs: if ${{ matrix.coverage }}; then echo "Add a coverage report" fi + - name: on fait pytest normal + if: ${{ !matrix.coverage }} + run: echo "pytest" + - name: on fait pytest avec coverage + if: ${{ matrix.coverage }} + run: echo "pytest --cov" # This workflow contains a single job called "build" build: From 04c09d4f0a276dc409e85f662a15db643ff2ccb4 Mon Sep 17 00:00:00 2001 From: Nolwen <–huet@imacs.polytechnique.fr> Date: Fri, 1 Jul 2022 14:54:28 +0200 Subject: [PATCH 59/60] show github context --- .github/workflows/blank.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/blank.yml b/.github/workflows/blank.yml index eaf0487..3617f56 100644 --- a/.github/workflows/blank.yml +++ b/.github/workflows/blank.yml @@ -12,6 +12,15 @@ on: # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: + github-context: + runs-on: ubuntu-latest + steps: + - name: Dump github context + run: echo "$GITHUB_CONTEXT" + shell: bash + env: + GITHUB_CONTEXT: ${{ toJson(github) }} + matrix-testing: runs-on: ubuntu-latest strategy: From 06ac609e8b9f39e986854a110d934472a28b10f2 Mon Sep 17 00:00:00 2001 From: Nolwen <–huet@imacs.polytechnique.fr> Date: Fri, 1 Jul 2022 14:55:13 +0200 Subject: [PATCH 60/60] Add new feature --- new_feature | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 new_feature diff --git a/new_feature b/new_feature new file mode 100644 index 0000000..e69de29