Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
a891f21
List tags
nhuet Nov 30, 2021
ddc0551
List remote
nhuet Nov 30, 2021
db1d68f
Fetch toto
nhuet Nov 30, 2021
8f1ede4
Add --all
nhuet Nov 30, 2021
7f820e0
Tag binder env on releases
nhuet Nov 30, 2021
85ea8ab
Add identity
nhuet Nov 30, 2021
0b44627
Add identity again
nhuet Nov 30, 2021
30a6502
Create binder env in a separate job
nhuet Nov 30, 2021
a208112
Fix yaml
nhuet Nov 30, 2021
e5dd06b
Use new binder env in doc
nhuet Nov 30, 2021
8b13114
Cache binder build on mybinder.org
nhuet Nov 30, 2021
9cb6e58
Change the way the env var BINDER_TAG is passed
nhuet Nov 30, 2021
e9b7bb3
Test env variable context
nhuet Nov 30, 2021
bbf13b3
Use env.BINDER_TAG to reference binder env branch
nhuet Nov 30, 2021
8cbe913
Build binder docker image
nhuet Dec 2, 2021
e4cedb1
Test variables
nhuet Dec 3, 2021
be72a6b
Add test
nhuet Dec 3, 2021
d8af65f
Test squashing commits on gh-pages
nhuet Apr 12, 2022
7d0b77a
Squash only if second to last commit was for master doc
nhuet Apr 12, 2022
ceb2e19
T
nhuet Apr 12, 2022
a075103
Fix a mistype in pattern
nhuet Apr 12, 2022
63e5004
Update release workflow to update doc with an appropriate commit msg
nhuet Apr 12, 2022
e8fd787
Deploy master doc
nhuet Apr 12, 2022
4763bbb
Add a print
nhuet Apr 12, 2022
8ea9487
Change options order
nhuet Apr 12, 2022
2cf2033
Show log
nhuet Apr 12, 2022
43119fb
fix bug
nhuet Apr 12, 2022
5561509
Add a file
nhuet Apr 12, 2022
fed3cc2
Reset to origin/gh-pages before anything else
nhuet Apr 12, 2022
9ec5a34
dmjhv
nhuet Apr 12, 2022
459b5c9
dmjhvq
nhuet Apr 12, 2022
0dfd52d
Add another checkout step
nhuet Apr 12, 2022
5ce7039
Remove useless prints
nhuet Apr 12, 2022
9171e96
Add a new file to docs
nhuet Apr 12, 2022
a63c517
Check rather that 2 last commits titles match
nhuet Apr 12, 2022
b18e3da
modify master doc at each push
nhuet Apr 12, 2022
86e2794
add first version of yo.md
nhuet Apr 12, 2022
77d2420
Update build doc
nhuet Apr 12, 2022
9c15729
Use last commit message
nhuet Apr 12, 2022
e3a40e1
Test python setup with env var
nhuet May 30, 2022
0938e32
Test matrix
nhuet Jun 23, 2022
0de7512
more colors
nhuet Jun 23, 2022
b7384fd
Remove conditional workflows
nhuet Jun 23, 2022
8968069
List colors beforehand
nhuet Jun 23, 2022
aaf163b
Add one more element
nhuet Jun 30, 2022
bca7374
Add a green ubuntu (not listing green in main matrix def)
nhuet Jun 30, 2022
b5be4c5
Try having blue & green for ubuntu 3.7
nhuet Jun 30, 2022
432b52d
Another tryin adding green
nhuet Jun 30, 2022
b1fc49d
Change orderwq
nhuet Jun 30, 2022
8bac46a
color-> gurobi
nhuet Jun 30, 2022
7e69cbc
color-> gurobi corrected
nhuet Jun 30, 2022
4bfaf7a
color-> gurobi bool
nhuet Jun 30, 2022
0a3b9fb
wo_gurobi bool
nhuet Jun 30, 2022
8fd48dd
wo_gurobi str
nhuet Jun 30, 2022
c811930
use exclude
nhuet Jun 30, 2022
8114ef3
conditional pip install
nhuet Jun 30, 2022
b82a5d3
coverage report
Jul 1, 2022
6668c9b
cahnge pytest according to coverage
Jul 1, 2022
04c09d4
show github context
Jul 1, 2022
06ac609
Add new feature
Jul 1, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
123 changes: 120 additions & 3 deletions .github/workflows/blank.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,131 @@ 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:
fail-fast: false
matrix:
os: [ "ubuntu-latest", "macos-latest"]
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
- coverage: false
- os: "ubuntu-latest"
python-version: "3.9"
wo_gurobi: ""
coverage: true
exclude:
- os: "macos-latest"
wo_gurobi: "without gurobi"
- os: "ubuntu-latest"
wo_gurobi: "without gurobi"
python-version: 3.7
- os: "ubuntu-latest"
wo_gurobi: "without gurobi"
python-version: 3.8

steps:
- name: on teste la matrice
run: |
echo ${{ matrix.wo_gurobi }}
echo ${{ matrix.minizinc_path }}
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
- 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:
# 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
- uses: actions/checkout@v2
- 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:
submodules: true
fetch-depth: 0 # fetch all branches

- name: build master doc (fake it by appending a word)
run: |
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:
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: 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
# 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
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~
git config user.name "Actions"
git config user.email "actions@github.com"
git commit --amend --no-edit
git push -f origin gh-pages
fi


- name: Tests
run: |
echo $GITHUB_REF
echo ${{ github.ref }}
echo ${{ github.ref_name }}
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: |
Expand Down Expand Up @@ -53,6 +169,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 }}
Expand All @@ -65,4 +183,3 @@ jobs:
- name: deploy
if: ${{ github.ref == 'refs/heads/main' }}
run: echo deploy

73 changes: 32 additions & 41 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,57 +10,48 @@ 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
create-binder-env:
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
- name: Get scikit-decide release version and define new binder env tag
run: |
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 "DOCS_VERSION_PATH=/version/$SKDECIDE_VERSION/" >> $GITHUB_ENV

# Checks-out current branch
- uses: actions/checkout@v2

- name: Deploy 🚀
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: ${{ 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
env:
DOCS_VERSION_PATH: /

steps:
- 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
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
# 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}"
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}

# Runs a single command using the runners shell
- name: Run a one-line script
run: echo ${{ github.ref }}

# Runs a set of commands using the runners shell
- name: Run a multi-line script
run: |
echo Add other actions to build,
echo test, and deploy your project.
- name: deploy
if: ${{ github.ref == 'refs/heads/main' }}
run: echo deploy

26 changes: 0 additions & 26 deletions .github/workflows/workflow2.yml

This file was deleted.

32 changes: 0 additions & 32 deletions .github/workflows/workflow3.yml

This file was deleted.

Empty file added doc/a
Empty file.
Empty file added doc/anpother
Empty file.
Empty file added doc/b
Empty file.
Empty file added doc/c
Empty file.
Empty file added doc/masterreadme.md
Empty file.
Empty file added doc/newone
Empty file.
3 changes: 3 additions & 0 deletions doc/yo.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
\nyo
\nyo
yo
Empty file added new_feature
Empty file.