Skip to content

Commit

Permalink
Merge pull request #185 from ChrisCummins/development
Browse files Browse the repository at this point in the history
Release v0.3.1
  • Loading branch information
ChrisCummins authored Oct 14, 2021
2 parents d0c9faa + 6c6e5d9 commit 765b1b6
Show file tree
Hide file tree
Showing 15 changed files with 165 additions and 159 deletions.
10 changes: 2 additions & 8 deletions .github/actions/install-build-dependencies/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,11 @@ runs:

- name: Install Python dependencies
run: |
python -m pip install -r requirements.txt
python -m pip install -U pip setuptools wheel
python -m pip install -r programl/requirements.txt
echo /home/runner/.local/bin >> $GITHUB_PATH
shell: bash

# DGL creates ~/.dgl on first run and I have found that this will fail
# if run from pytest / bazel.
- name: Initialize DGL
run: |
python -c 'import dgl; print(dgl.__version__)'
shell: bash

- name: whoami
run: ./tools/whoami.sh
shell: bash
36 changes: 0 additions & 36 deletions .github/workflows/bazel_test.yaml

This file was deleted.

53 changes: 53 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
---
# This workflow is used to build the binary wheels that can be uploaded to pypi
# for releases. It produces an artifact containing a macOS and manylinux binary
# wheel from the requested branch.
name: Build Binaries

on:
workflow_dispatch:
pull_request:
branches: [stable]
push:
branches: [stable]

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest]
steps:
- uses: actions/checkout@v2

- name: Evaluate artifact name
run: |
echo "ARTIFACT=programl-$(cat version.txt)" >> $GITHUB_ENV
echo "Artifact name is $ARTIFACT"
- uses: actions/setup-python@v2
with:
python-version: 3.9

- name: Install build dependencies
uses: ./.github/actions/install-build-dependencies

- name: Build Python wheel
run: |
if [ "$(uname)" = "Darwin" ]; then
make bdist_wheel
else
make bdist_wheel-linux
fi
env:
BAZEL_OPTS: --batch
BAZEL_FETCH_OPTS: --config=ci
BAZEL_BUILD_OPTS: --config=ci -c opt

- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: ${{ env.ARTIFACT }}
path: dist/*.whl
if-no-files-found: error
retention-days: 14
86 changes: 86 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
---
name: CI

on:
push:
branches:
- development
- stable
pull_request:
schedule:
- cron: 0 0 * * 0 # weekly

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v2

- uses: actions/setup-python@v2
with:
python-version: 3.9

- name: Install build dependencies
uses: ./.github/actions/install-build-dependencies

- name: Build Python wheel
run: |
make bdist_wheel
if [ "$(uname)" != "Darwin" ]; then
make bdist_wheel-linux-rename
fi
env:
CC: clang
CXX: clang++
BAZEL_OPTS: --batch
BAZEL_FETCH_OPTS: --config=ci
BAZEL_BUILD_OPTS: --config=ci

- name: Upload Python wheel
uses: actions/upload-artifact@v2
with:
name: ${{ matrix.os }}-wheel
path: dist/*.whl
if-no-files-found: error
retention-days: 7

test:
needs: build
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
python: [3.6, 3.7, 3.8, 3.9]
steps:
- uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}

- name: Download Python wheel
uses: actions/download-artifact@v2
with:
name: ${{ matrix.os }}-wheel

- name: Install wheel
run: python -m pip install *.whl

- name: Install test dependencies
run: python -m pip install -r tests/requirements.txt

# DGL creates ~/.dgl on first run and I have found that this will fail
# if run from pytest.
- name: Initialize DGL
run: |
python -c 'import dgl; print(dgl.__version__)'
shell: bash

- name: Test
run: make install-test
46 changes: 0 additions & 46 deletions .github/workflows/coverage.yaml

This file was deleted.

56 changes: 0 additions & 56 deletions .github/workflows/install_test.yaml

This file was deleted.

5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## v0.3.1 (2021-10-15)

This micro release relaxes the version requirements of the protobuf and grpcio
Python dependencies, and adds torch to the core dependencies.

## v0.3.0 (2021-06-24)

This release adds a much simpler, flat Python API. The API comprises three
Expand Down
10 changes: 6 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -177,12 +177,14 @@ bdist_wheel: bazel-build
bdist_wheel-linux-rename:
mv dist/programl-$(VERSION)-py3-none-linux_x86_64.whl dist/programl-$(VERSION)-py3-none-manylinux2014_x86_64.whl

# The docker image to use for building the bdist_wheel-linux target. See
# packaging/Dockerfile.
MANYLINUX_DOCKER_IMAGE ?= chriscummins/compiler_gym-manylinux-build:2021-09-21

bdist_wheel-linux:
rm -rf build
docker build -t chriscummins/compiler_gym-linux-build packaging
docker run -v $(ROOT):/ProGraML --workdir /ProGraML --rm --shm-size=8g chriscummins/compiler_gym-linux-build:latest /bin/sh -c './packaging/container_init.sh && make bdist_wheel'
mv dist/programl-$(VERSION)-py3-none-linux_x86_64.whl dist/programl-$(VERSION)-py3-none-manylinux2014_x86_64.whl
rm -rf build
docker pull $(MANYLINUX_DOCKER_IMAGE)
docker run -v $(ROOT):/ProGraML --workdir /ProGraML --rm --shm-size=8g "$(MANYLINUX_DOCKER_IMAGE)" /bin/sh -c './packaging/container_init.sh && make bdist_wheel bdist_wheel-linux-rename BAZEL_OPTS="$(BAZEL_OPTS)" BAZEL_BUILD_OPTS="$(BAZEL_BUILD_OPTS)" BAZEL_FETCH_OPTS="$(BAZEL_FETCH_OPTS)" && rm -rf build'

bdist_wheel-linux-shell:
docker run -v $(ROOT):/ProGraML --workdir /ProGraML --rm --shm-size=8g -it --entrypoint "/bin/bash" chriscummins/compiler_gym-linux-build:latest
Expand Down
2 changes: 1 addition & 1 deletion packaging/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ RUN apt-get update \
'patchelf=0.9-1' \
'python3-dev=3.6.7-1~18.04' \
'python3-distutils=3.6.9-1~18.04' \
'python3-pip=9.0.1-2.3~ubuntu1.18.04.4' \
'python3-pip=9.0.1-2.3~ubuntu1.18.04.5' \
'python3=3.6.7-1~18.04' \
'rsync=3.1.2-2.1ubuntu1.1' \
'zlib1g-dev=1:1.2.11.dfsg-0ubuntu2' \
Expand Down
Empty file modified packaging/container_init.sh
100644 → 100755
Empty file.
5 changes: 3 additions & 2 deletions programl/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
absl-py>=0.11.0
dgl>=0.6.1
grpcio==1.33.2
grpcio>=1.33.2
networkx>=2.4
numpy>=1.19.3
protobuf==3.13.0
protobuf>=3.13.0
torch>=1.8.0
tqdm>=4.38.0
3 changes: 2 additions & 1 deletion tasks/devmap/dataset/create.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,8 @@ def create_devmap_dataset(path: Path):
checksum="095c1ccef333e0a65e0e70b3ebde0aef851b61528ec46496a5d1687905abd099",
)
opencl_ir_zip = download(
url="http://polybox.ethz.ch/index.php/s/U08Z3xLhvbLk8io/download",
# Upstream URL: https://github.com/spcl/ncc/tree/master/task
url="https://www.dropbox.com/s/j5ck80fsbuebf5g/devmap_data.zip?dl=1",
checksum="3c840f84936a83e329c7a94d011c45ddfcfce8bdbb1a9b1904123e83851913d5",
)

Expand Down
1 change: 0 additions & 1 deletion tasks/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
pandas==1.1.4
requests==2.24.0
torch>=1.8.0
9 changes: 6 additions & 3 deletions tools/bzl/deps.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,12 @@ def programl_deps():

http_archive(
name="com_google_absl",
sha256="d10f684f170eb36f3ce752d2819a0be8cc703b429247d7d662ba5b4b48dd7f65",
strip_prefix="abseil-cpp-3088e76c597e068479e82508b1770a7ad0c806b6",
url="https://github.com/abseil/abseil-cpp/archive/3088e76c597e068479e82508b1770a7ad0c806b6.tar.gz",
sha256="35f22ef5cb286f09954b7cc4c85b5a3f6221c9d4df6b8c4a1e9d399555b366ee",
strip_prefix="abseil-cpp-997aaf3a28308eba1b9156aa35ab7bca9688e9f6",
urls=[
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/abseil/abseil-cpp/archive/997aaf3a28308eba1b9156aa35ab7bca9688e9f6.tar.gz",
"https://github.com/abseil/abseil-cpp/archive/997aaf3a28308eba1b9156aa35ab7bca9688e9f6.tar.gz",
],
)

http_archive(
Expand Down
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.3.0
0.3.1

0 comments on commit 765b1b6

Please sign in to comment.