Skip to content
This repository was archived by the owner on Dec 18, 2023. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
13 changes: 8 additions & 5 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ jobs:
fail-fast: false
matrix:
os: [windows-latest]
python-version: ['3.7', '3.8', '3.9', '3.10']
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
include:
- python-version: '3.8' # source distribution only needs to be build once
- python-version: '3.10' # source distribution only needs to be built once
os: ubuntu-latest
defaults:
run:
Expand All @@ -53,7 +53,7 @@ jobs:
run: |
git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
bootstrap-vcpkg.bat
bootstrap-vcpkg.bat -disableMetrics
vcpkg integrate install
vcpkg install range-v3

Expand All @@ -62,7 +62,9 @@ jobs:
run: |
git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
./bootstrap-vcpkg.sh
./bootstrap-vcpkg.sh -disableMetrics
# Ensure the .vcpkg directory exists, otherwise the next command will fail
mkdir -p ~/.vcpkg
./vcpkg integrate install
./vcpkg install range-v3
sudo mv ./packages/range-v3_x64-linux/include /usr/include/range-v3
Expand Down Expand Up @@ -128,7 +130,8 @@ jobs:
yum install -y curl zip unzip tar wget boost169-devel &&
git clone https://github.com/Microsoft/vcpkg.git &&
cd vcpkg &&
./bootstrap-vcpkg.sh &&
./bootstrap-vcpkg.sh -disableMetrics &&
mkdir -p ~/.vcpkg &&
./vcpkg integrate install &&
./vcpkg install range-v3 &&
wget https://gitlab.com/libeigen/eigen/-/archive/3.4.0/eigen-3.4.0.tar.gz &&
Expand Down
106 changes: 48 additions & 58 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,75 +1,65 @@
name: Documentation

on:
push:
branches: [ main ]
branches: [main]
pull_request:
branches: [ main ]

branches: [main]
jobs:
build_docs_job:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7]
python-version: ['3.10']
defaults:
run:
# https://github.com/conda-incubator/setup-miniconda/tree/v2#use-a-default-shell
shell: bash -l {0}

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Set up Miniconda with Python ${{ matrix.python-version }}
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
miniconda-version: "latest"
python-version: ${{ matrix.python-version }}
activate-environment: test_env

- name: Install range-v3 dependency
run: |
git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
./bootstrap-vcpkg.sh
./vcpkg integrate install
./vcpkg install range-v3

- name: Install other dependencies
run: |
sudo apt-get install -y yarn
conda install -c conda-forge -y boost-cpp eigen=3.4.0
python -m pip install --upgrade pip
python -m pip install setuptools
python -m pip install notebook

- name: Install Bean Machine in editable mode
run: pip install -v -e .[dev]

- name: Add tutorials to Docs
run: make tutorials

- name: Check env
run: echo `which sphinx-build`

- name: Build the Website
run: |
cd website
yarn install
make all
cd ..

- name: Get output time
run: echo "The time was ${{ steps.build.outputs.time }}"

- name: Deploy
if: |
github.event_name == 'push' &&
github.repository == 'facebookresearch/beanmachine'
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Miniconda with Python ${{ matrix.python-version }}
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
miniconda-version: latest
python-version: ${{ matrix.python-version }}
activate-environment: test_env
- name: Install range-v3 dependency
run: |
git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
./bootstrap-vcpkg.sh -disableMetrics
# Ensure the .vcpkg directory exists, otherwise the next command will fail
mkdir -p ~/.vcpkg
./vcpkg integrate install
./vcpkg install range-v3
- name: Install other dependencies
run: |
sudo apt-get install -y yarn
conda install -c conda-forge -y boost-cpp eigen=3.4.0
python -m pip install --upgrade pip
python -m pip install setuptools
python -m pip install notebook
- name: Install Bean Machine in editable mode
run: pip install -v -e .[dev]
- name: Add tutorials to Docs
run: make tutorials
- name: Check env
run: echo `which sphinx-build`
- name: Build the Website
run: |
cd website
yarn install
make all
cd ..
- name: Get output time
run: echo "The time was ${{ steps.build.outputs.time }}"
- name: Deploy
if: |
github.event_name == 'push' &&
github.repository == 'facebookresearch/beanmachine'
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages # The branch the action should deploy to.
FOLDER: website/build # The folder the action should deploy.
82 changes: 37 additions & 45 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,60 +1,52 @@
name: Lint

on:
push:
branches: [ main ]
branches: [main]
pull_request:
branches: [ main ]

branches: [main]
jobs:
lint:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [3.7]
python-version: ['3.10']
defaults:
run:
# https://github.com/conda-incubator/setup-miniconda/tree/v2#use-a-default-shell
shell: bash -l {0}

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Set up Miniconda with Python ${{ matrix.python-version }}
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
miniconda-version: "latest"
python-version: ${{ matrix.python-version }}
activate-environment: test_env

- name: Install Unix range-v3 dependency
if: matrix.os != 'windows-latest'
run: |
git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
./bootstrap-vcpkg.sh
./vcpkg integrate install
./vcpkg install range-v3

- name: Install dependencies
run: |
conda install -c conda-forge -y boost-cpp eigen=3.4.0
pip install torch --extra-index-url https://download.pytorch.org/whl/cpu
VERSION=$(grep "version" .pyre_configuration | sed -n -e 's/.*\(0\.0\.[0-9]*\).*/\1/p')
pip install pyre-check-nightly==$VERSION
pip install -v .[dev]

- name: Print out package info to help with debug
run: pip list

- name: Lint with flake8
run: flake8 . --exclude ./vcpkg

- name: Lint with ufmt (black + usort)
run: ufmt check .*/beanmachine/src

- name: Run Pyre
run: pyre
- name: Checkout
uses: actions/checkout@v2
- name: Set up Miniconda with Python ${{ matrix.python-version }}
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
miniconda-version: latest
python-version: ${{ matrix.python-version }}
activate-environment: test_env
- name: Install Unix range-v3 dependency
if: matrix.os != 'windows-latest'
run: |
git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
./bootstrap-vcpkg.sh -disableMetrics
# Ensure the .vcpkg directory exists, otherwise the next command will fail
mkdir -p ~/.vcpkg
./vcpkg integrate install
./vcpkg install range-v3
- name: Install dependencies
run: |
conda install -c conda-forge -y boost-cpp eigen=3.4.0
pip install torch --extra-index-url https://download.pytorch.org/whl/cpu
VERSION=$(grep "version" .pyre_configuration | sed -n -e 's/.*\(0\.0\.[0-9]*\).*/\1/p')
pip install pyre-check-nightly==$VERSION
pip install -v .[dev]
- name: Print out package info to help with debug
run: pip list
- name: Lint with flake8
run: flake8 . --exclude ./vcpkg
- name: Lint with ufmt (black + usort)
run: ufmt check .*/beanmachine/src
- name: Run Pyre
run: pyre
6 changes: 4 additions & 2 deletions .github/workflows/nightly.yml.disabled
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7]
python-version: ['3.10']
defaults:
run:
# https://github.com/conda-incubator/setup-miniconda/tree/v2#use-a-default-shell
Expand All @@ -36,7 +36,9 @@ jobs:
run: |
git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
./bootstrap-vcpkg.sh
./bootstrap-vcpkg.sh -disableMetrics
# Ensure the .vcpkg directory exists, otherwise the next command will fail
mkdir -p ~/.vcpkg
./vcpkg integrate install
./vcpkg install range-v3

Expand Down
Loading