Skip to content

Commit

Permalink
Merge branch 'main' into sam/sqlalchemy_v2
Browse files Browse the repository at this point in the history
  • Loading branch information
samscott89 authored Jun 11, 2024
2 parents 1075351 + efc3407 commit 4bec869
Show file tree
Hide file tree
Showing 59 changed files with 453 additions and 231 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cla.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
remote-repository-name: cla-signatures
path-to-signatures: individual.json
branch: main
allowlist: djanatyn,gj,gneray,jedgresham,killpack,laxjesse,patrickod,samscott89,ssglaser,uncommoncense,vrama628,dependabot,dependabot[bot]
allowlist: djanatyn,edaniels,gj,gneray,gsarjeant,jedgresham,killpack,laxjesse,orez-,samscott89,ssglaser,sverch,uncommoncense,vrama628,dependabot,dependabot[bot]
use-dco-flag: false
create-file-commit-message: 'Creating file for storing CLA signatures'
signed-commit-message: '$contributorName has signed the CLA in osohq/oso#$pullRequestNo'
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/docs-diff.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ jobs:
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
ruby-version: 2.4
working-directory: "languages/ruby"
if: steps.cache.outputs.cache-hit != 'true'
- name: Install yard
Expand Down Expand Up @@ -84,7 +83,7 @@ jobs:
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.79.1'
hugo-version: "0.79.1"
if: steps.cache.outputs.cache-hit != 'true'
- name: Build Hugo docs
env:
Expand Down Expand Up @@ -136,7 +135,7 @@ jobs:
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
ruby-version: 2.4
ruby-version: "2.7"
working-directory: "languages/ruby"
if: steps.cache.outputs.cache-hit != 'true'
- name: Install yard
Expand Down Expand Up @@ -171,7 +170,7 @@ jobs:
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.79.1'
hugo-version: "0.79.1"
if: steps.cache.outputs.cache-hit != 'true'
- name: Build Hugo docs
env:
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/docs-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ jobs:
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
ruby-version: 2.4
working-directory: "languages/ruby"
- name: Install yard
run: gem install yard
Expand Down Expand Up @@ -61,7 +60,7 @@ jobs:
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.79.1'
hugo-version: "0.79.1"
- name: Get branch name (branch)
if: github.event_name != 'pull_request'
shell: bash
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ on:
description: "docs s3 path (docs.oso.dev or docs-preview.oso.dev)"
oso_version:
description: "oso release to build docs for"
default: "0.27.0" # oso_version
default: "0.27.3" # oso_version
flask_oso_version:
description: "flask oso release to build docs for"
default: "0.27.0" # flask_oso_version
default: "0.27.1" # flask_oso_version
django_oso_version:
description: "django oso release to build docs for"
default: "0.27.0" # django_oso_version
default: "0.27.1" # django_oso_version
sqlalchemy_oso_version:
description: "sqlalchemy oso release to build docs for"
default: "0.27.0" # sqlalchemy_oso_version
default: "0.27.1" # sqlalchemy_oso_version

# Needed to get an AWS token
permissions:
Expand Down Expand Up @@ -49,7 +49,6 @@ jobs:
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
ruby-version: 2.4
working-directory: "languages/ruby"
- name: Install yard
run: gem install yard
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,13 @@ jobs:
- name: Copy libraries into resources.
run: |
mkdir -p languages/java/oso/src/main/resources/linux
cp -r oso-lib-${{ github.event.inputs.version }}/libpolar.so languages/java/oso/src/main/resources/linux/
cp -r oso-lib-${{ github.event.inputs.version }}/libpolar-x86_64.so languages/java/oso/src/main/resources/linux/libpolar.so
mkdir -p languages/java/oso/src/main/resources/macos
cp -r oso-lib-${{ github.event.inputs.version }}/libpolar-macOS-fat.dylib languages/java/oso/src/main/resources/macos/libpolar.dylib
mkdir -p languages/java/oso/src/main/resources/win
cp -r oso-lib-${{ github.event.inputs.version }}/polar.dll languages/java/oso/src/main/resources/win/
- run: |
GPG_TTY=$(tty) mvn -q clean source:jar deploy -DuniqueVersion=false -Dmaven.source.useDefaultManifestFile=true -DdeplyAtEnd=true -Dmaven.source.includePom=true -Dmaven.install.skip=true --settings settings.xml
GPG_TTY=$(tty) mvn -q clean source:jar deploy -DuniqueVersion=false -Dmaven.source.useDefaultManifestFile=true -DdeployAtEnd=true -Dmaven.source.includePom=true -Dmaven.install.skip=true --settings settings.xml
working-directory: languages/java/oso
python:
name: Publish python package to pypi
Expand Down Expand Up @@ -108,7 +108,7 @@ jobs:
- name: Set up ruby ${{ matrix.ruby-version }}
uses: ruby/setup-ruby@v1
with:
ruby-version: "2.7"
ruby-version: "3.2"
working-directory: "languages/ruby"
- run: gem push oso-oso-${{ github.event.inputs.version }}.gem
working-directory: "oso-ruby-${{ github.event.inputs.version }}"
Expand Down
88 changes: 53 additions & 35 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,33 +53,44 @@ jobs:
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
toolchain: 1.69.0
override: true
- name: Build release libraries
run: cargo build --release -p polar-c-api
- name: Build x86_64 release musl library
run: |
rustup target add x86_64-unknown-linux-musl
RUSTFLAGS="-C target-feature=-crt-static" cargo build --target x86_64-unknown-linux-musl --release -p polar-c-api
- name: Download cross
- name: Install cross
env:
GH_TOKEN: ${{ github.token }}
run: gh release download --repo cross-rs/cross --pattern 'cross-x86_64-unknown-linux-gnu\.tar\.gz'
run: |
gh release download --repo cross-rs/cross --pattern 'cross-x86_64-unknown-linux-gnu\.tar\.gz'
tar -xzvf cross-x86_64-unknown-linux-gnu.tar.gz
- name: Build aarch64 dynamic lib
run: |
rustup target add aarch64-unknown-linux-gnu
RUSTFLAGS="-C target-feature=-crt-static" ./cross build --target aarch64-unknown-linux-gnu --release -p polar-c-api
- name: Build aarch64 release musl library
run: |
rustup target add aarch64-unknown-linux-musl
tar -xzvf cross-x86_64-unknown-linux-gnu.tar.gz
RUSTFLAGS="-C target-feature=-crt-static" ./cross build --target aarch64-unknown-linux-musl --release -p polar-c-api
- name: Build x86_64 release libraries
run: cargo build --release -p polar-c-api
- name: Build x86_64 release musl library
run: |
rustup target add x86_64-unknown-linux-musl
RUSTFLAGS="-C target-feature=-crt-static" cargo build --target x86_64-unknown-linux-musl --release -p polar-c-api
- name: Rename static lib
run: mv target/release/libpolar.a target/libpolar-${{runner.os}}.a
- name: Rename x86_64 static lib
run: mv target/x86_64-unknown-linux-musl/release/libpolar.a target/libpolar-musl-x86_64.a
- name: Rename aarch64 static lib
run: mv target/aarch64-unknown-linux-musl/release/libpolar.a target/libpolar-musl-aarch64.a
- name: Rename x86_64 dynamic lib
run: mv target/release/libpolar.so target/libpolar-x86_64.so
- name: Rename aarch64 dynamic lib
run: mv target/aarch64-unknown-linux-gnu/release/libpolar.so target/libpolar-aarch64.so
- uses: actions/upload-artifact@v2
with:
name: oso_library
path: target/release/libpolar.so
path: |
target/libpolar-x86_64.so
target/libpolar-aarch64.so
- uses: actions/upload-artifact@v2
with:
name: oso_library
Expand All @@ -106,7 +117,7 @@ jobs:
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
toolchain: 1.69.0
override: true
- name: Build release library
run: cargo build --release -p polar-c-api
Expand Down Expand Up @@ -151,7 +162,7 @@ jobs:

windows_libs:
name: Build release libraries on Windows
runs-on: windows-latest
runs-on: windows-2019
needs: [version]
steps:
- uses: actions/checkout@v2
Expand All @@ -166,7 +177,7 @@ jobs:
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
toolchain: 1.69.0
override: true
- name: Build release library
run: cargo build --release -p polar-c-api
Expand Down Expand Up @@ -252,7 +263,7 @@ jobs:
- name: Copy libraries into resources.
run: |
mkdir -p languages/java/oso/src/main/resources/linux
cp -r oso_library/libpolar.so languages/java/oso/src/main/resources/linux/
cp -r oso_library/libpolar-x86_64.so languages/java/oso/src/main/resources/linux/libpolar.so
mkdir -p languages/java/oso/src/main/resources/macos
cp -r oso_library/libpolar-macOS-fat.dylib languages/java/oso/src/main/resources/macos/libpolar.dylib
mkdir -p languages/java/oso/src/main/resources/win
Expand Down Expand Up @@ -280,7 +291,6 @@ jobs:
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
ruby-version: 2.4
working-directory: "languages/ruby"
- name: Set version env
id: version
Expand All @@ -292,7 +302,8 @@ jobs:
- name: Copy libraries into resources.
run: |
mkdir -p languages/ruby/ext/oso-oso/lib
cp -r oso_library/libpolar.so languages/ruby/ext/oso-oso/lib/
cp -r oso_library/libpolar-x86_64.so languages/ruby/ext/oso-oso/lib/
cp -r oso_library/libpolar-aarch64.so languages/ruby/ext/oso-oso/lib/
cp -r oso_library/libpolar-macOS-fat.dylib languages/ruby/ext/oso-oso/lib/libpolar.dylib
cp -r oso_library/polar.dll languages/ruby/ext/oso-oso/lib/
- name: Test
Expand Down Expand Up @@ -329,7 +340,7 @@ jobs:
rm languages/python/oso/README.md
cp README.md languages/python/oso/README.md
- name: Build wheels
uses: pypa/cibuildwheel@v2.11.2
uses: pypa/cibuildwheel@v2.16.2
env:
# Skip Python 2.7 and Python 3.5
CIBW_SKIP: "cp27-* cp35-* pp27-*"
Expand Down Expand Up @@ -364,7 +375,7 @@ jobs:
rm languages/python/oso/README.md
cp README.md languages/python/oso/README.md
- name: Build wheels
uses: pypa/cibuildwheel@v2.11.2
uses: pypa/cibuildwheel@v2.16.2
env:
# Skip Python 2.7 and Python 3.5
CIBW_SKIP: "cp27-* cp35-* pp27-*"
Expand All @@ -383,7 +394,7 @@ jobs:

build_windows_wheels:
name: Build wheels on Windows
runs-on: windows-latest
runs-on: windows-2019
needs: [version, windows_libs]
steps:
- uses: actions/checkout@v2
Expand All @@ -401,7 +412,7 @@ jobs:
rm languages/python/oso/README.md
cp README.md languages/python/oso/README.md
- name: Build wheels
uses: pypa/cibuildwheel@v2.11.2
uses: pypa/cibuildwheel@v2.16.2
env:
# Skip Python 2.7 and Python 3.5
CIBW_SKIP: "cp27-* cp35-* pp27-*"
Expand Down Expand Up @@ -438,7 +449,7 @@ jobs:
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
toolchain: 1.69.0
override: true
- name: Add WebAssembly target
run: rustup target add wasm32-unknown-unknown
Expand All @@ -463,7 +474,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-11, windows-latest]
os: [ubuntu-latest, macos-11, windows-2019]
go-version: ["1.14", "1.15", "1.16", "1.17"]
steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -531,7 +542,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v2
- name: Set version env
Expand Down Expand Up @@ -560,7 +571,7 @@ jobs:
runs-on: macos-11
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v2
- name: Set version env
Expand Down Expand Up @@ -625,14 +636,21 @@ jobs:
arch -arm64 ./venv311/bin/pip install oso==${{ steps.version.outputs.oso_version }} -f ../wheel
arch -arm64 ./venv311/bin/python test.py
working-directory: test
- name: "test python 3.12"
run: |
arch -arm64 /opt/homebrew/opt/[email protected]/bin/python3 -m venv venv312
arch -arm64 ./venv312/bin/pip install oso==${{ steps.version.outputs.oso_version }} -f ../wheel --no-deps --no-index
arch -arm64 ./venv312/bin/pip install oso==${{ steps.version.outputs.oso_version }} -f ../wheel
arch -arm64 ./venv312/bin/python test.py
working-directory: test

validate_python_windows:
name: Test python ${{ matrix.python-version }} on Windows
needs: [build_windows_wheels]
runs-on: windows-latest
runs-on: windows-2019
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v2
- name: Set version env
Expand Down Expand Up @@ -661,7 +679,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v2
- name: Set version env
Expand All @@ -681,8 +699,8 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-11, windows-latest]
ruby-version: [2.4, 2.5, 2.6, 2.7, "3.0"]
os: [ubuntu-latest, macos-11, windows-2019]
ruby-version: ["2.6", "2.7", "3.0", "3.1", "3.2"]
steps:
- uses: actions/checkout@v2
- name: Set version env
Expand Down Expand Up @@ -714,7 +732,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-11, windows-latest]
os: [ubuntu-latest, macos-11, windows-2019]
java-version: [11, 12, 13, 14]
steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -749,7 +767,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-11, windows-latest]
os: [ubuntu-latest, macos-11, windows-2019]
node-version: ["12", "14", "16"]
steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -794,11 +812,11 @@ jobs:
uses: actions/setup-python@v1
with:
python-version: "3.7"
- name: Use Ruby 2.4
- name: Use Ruby 2.7
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
ruby-version: "2.4"
ruby-version: "2.7"
working-directory: "docs/examples/quickstart/ruby"
- name: Use Node.js 12
uses: actions/setup-node@v1
Expand All @@ -812,7 +830,7 @@ jobs:
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
toolchain: 1.69.0
override: true
- name: Use Go 1.14
uses: actions/setup-go@v2
Expand Down
Loading

0 comments on commit 4bec869

Please sign in to comment.