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

update rds2cpp #4

Merged
merged 11 commits into from
Mar 31, 2023
Merged
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
61 changes: 0 additions & 61 deletions .github/workflows/pypi-publish.yml

This file was deleted.

124 changes: 91 additions & 33 deletions .github/workflows/pypi-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,42 +3,100 @@

name: Test the library

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

jobs:
build:
test:
name: Running tests
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: "Install dependencies"
run: |
sudo apt-get install zlib1g-dev
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest tox cython numpy
cd extern/rds2cpp
cmake .
cd ../..
- name: Test with tox
run: |
python setup.py build_ext --inplace
tox

build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, macos-11] # at some point get this to work on windows-2019

steps:
- uses: actions/checkout@v3
with:
submodules: true

- name: Install dependencies
run: |
cd extern/rds2cpp
cmake .
cd ../..

- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_ARCHS_MACOS: x86_64 arm64

- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl

build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true

- name: Install dependencies
run: |
cd extern/rds2cpp
cmake .
cd ../..

- name: Build sdist
run: pipx run build --sdist

- uses: actions/upload-artifact@v3
with:
path: dist/*.tar.gz

upload_pypi:
needs: [test, build_wheels, build_sdist]
runs-on: ubuntu-latest
# upload to PyPI on every tag starting with 'v'
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
# alternatively, to publish when a GitHub Release is created, use the following rule:
# if: github.event_name == 'release' && github.event.action == 'published'
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: 'Install dependencies'
run: |
sudo apt-get install zlib1g-dev
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest tox cython numpy
cd extern/rds2cpp
cmake .
cd ../..
# - name: Lint with flake8
# run: |
# # stop the build if there are Python syntax errors or undefined names
# flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
# # flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with tox
run: |
python setup.py build_ext --inplace
tox
- uses: actions/download-artifact@v3
with:
# unpacks default artifact into dist/
# if `name: artifact` is omitted, the action will create extra parent dir
name: artifact
path: dist

- uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.PYPI_PASSWORD }}
2 changes: 1 addition & 1 deletion extern/rds2cpp
Submodule rds2cpp updated 58 files
+133 −9 README.md
+4 −1 docs/Doxyfile
+1 −1 extern/CMakeLists.txt
+93 −0 include/rds2cpp/Environment.hpp
+39 −0 include/rds2cpp/ExternalPointer.hpp
+286 −8 include/rds2cpp/RObject.hpp
+91 −0 include/rds2cpp/RdsFile.hpp
+0 −193 include/rds2cpp/Shared.hpp
+108 −0 include/rds2cpp/SharedParseInfo.hpp
+214 −0 include/rds2cpp/SharedWriteInfo.hpp
+32 −0 include/rds2cpp/Symbol.hpp
+25 −11 include/rds2cpp/parse_altrep.hpp
+23 −23 include/rds2cpp/parse_atomic.hpp
+9 −6 include/rds2cpp/parse_attributes.hpp
+32 −0 include/rds2cpp/parse_builtin.hpp
+59 −41 include/rds2cpp/parse_environment.hpp
+30 −0 include/rds2cpp/parse_expression.hpp
+36 −0 include/rds2cpp/parse_external_pointer.hpp
+57 −0 include/rds2cpp/parse_language.hpp
+11 −5 include/rds2cpp/parse_list.hpp
+22 −5 include/rds2cpp/parse_object.hpp
+7 −5 include/rds2cpp/parse_pairlist.hpp
+42 −76 include/rds2cpp/parse_rds.hpp
+8 −6 include/rds2cpp/parse_s4.hpp
+33 −30 include/rds2cpp/parse_single_string.hpp
+12 −9 include/rds2cpp/parse_symbol.hpp
+1 −0 include/rds2cpp/rds2cpp.hpp
+31 −29 include/rds2cpp/utils_parse.hpp
+110 −0 include/rds2cpp/utils_write.hpp
+163 −0 include/rds2cpp/write_atomic.hpp
+48 −0 include/rds2cpp/write_attributes.hpp
+31 −0 include/rds2cpp/write_builtin.hpp
+36 −0 include/rds2cpp/write_expression.hpp
+56 −0 include/rds2cpp/write_language.hpp
+36 −0 include/rds2cpp/write_list.hpp
+81 −0 include/rds2cpp/write_object.hpp
+62 −0 include/rds2cpp/write_pairlist.hpp
+83 −0 include/rds2cpp/write_rds.hpp
+58 −0 include/rds2cpp/write_s4.hpp
+53 −0 include/rds2cpp/write_single_string.hpp
+1 −1 tests/DESCRIPTION
+2 −0 tests/NAMESPACE
+5 −0 tests/R/RcppExports.R
+14 −0 tests/R/inspect.R
+12 −0 tests/src/RcppExports.cpp
+77 −8 tests/src/parse.cpp
+283 −0 tests/src/write.cpp
+20 −8 tests/tests/testthat/test-altrep.R
+156 −73 tests/tests/testthat/test-atomic.R
+29 −0 tests/tests/testthat/test-builtin.R
+248 −28 tests/tests/testthat/test-environment.R
+70 −0 tests/tests/testthat/test-expression.R
+130 −0 tests/tests/testthat/test-external-pointer.R
+116 −0 tests/tests/testthat/test-language.R
+42 −13 tests/tests/testthat/test-list.R
+47 −10 tests/tests/testthat/test-pairlist.R
+15 −14 tests/tests/testthat/test-s4.R
+119 −0 tests/tests/testthat/test-symbol.R