diff --git a/.github/workflows/artifacts.yml b/.github/workflows/artifacts.yml index a72c065d..86271ef4 100644 --- a/.github/workflows/artifacts.yml +++ b/.github/workflows/artifacts.yml @@ -37,7 +37,7 @@ jobs: path: target/release/oxigraph_server - uses: actions/upload-artifact@v3 with: - name: oxigraph_server_aarch64-linux_gnu + name: oxigraph_server_aarch64_linux_gnu path: target/aarch64-unknown-linux-gnu/release/oxigraph_server - run: mv target/release/oxigraph_server oxigraph_server_${{ github.event.release.tag_name }}_x86_64_linux_gnu if: github.event_name == 'release' @@ -181,20 +181,24 @@ jobs: cache: pip cache-dependency-path: '**/requirements.dev.txt' - run: pip install -r python/requirements.dev.txt - - run: maturin build --release -m python/Cargo.toml --features abi3 + - run: maturin build --release --features abi3 + working-directory: ./python - run: pip install --no-index --find-links=target/wheels/ pyoxigraph - run: rm -r target/wheels - run: python generate_stubs.py pyoxigraph pyoxigraph.pyi --black working-directory: ./python - - run: maturin build --release --target universal2-apple-darwin -m python/Cargo.toml --features abi3 - - run: maturin build --release -m python/Cargo.toml --features abi3 - if: github.event_name == 'release' - - run: maturin build --release --target aarch64-apple-darwin -m python/Cargo.toml --features abi3 - if: github.event_name == 'release' + - run: maturin build --release --features abi3 + working-directory: ./python + - run: maturin build --release --target aarch64-apple-darwin --features abi3 + working-directory: ./python - uses: actions/upload-artifact@v3 with: - name: pyoxigraph_wheel_universal2_mac - path: target/wheels/*.whl + name: pyoxigraph_wheel_x86_64_mac + path: target/wheels/*_x86_64.whl + - uses: actions/upload-artifact@v3 + with: + name: pyoxigraph_wheel_aarch64_mac + path: target/wheels/*_arm64.whl - run: pip install twine && twine upload target/wheels/* env: TWINE_USERNAME: __token__ @@ -216,13 +220,16 @@ jobs: cache-dependency-path: '**/requirements.dev.txt' - run: Remove-Item -LiteralPath "C:\msys64\" -Force -Recurse - run: pip install -r python/requirements.dev.txt - - run: maturin build --release -m python/Cargo.toml --features abi3 + - run: maturin build --release --features abi3 + working-directory: ./python - run: pip install --no-index --find-links=target/wheels/ pyoxigraph - run: rm -r target/wheels - run: python generate_stubs.py pyoxigraph pyoxigraph.pyi --black working-directory: ./python - - run: maturin build --release -m python/Cargo.toml --features abi3 - - run: maturin sdist -m python/Cargo.toml + - run: maturin build --release --features abi3 + working-directory: ./python + - run: maturin sdist + working-directory: ./python - uses: actions/upload-artifact@v3 with: name: pyoxigraph_wheel_x86_64_windows diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 00000000..23189aec --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,57 @@ +name: Artifacts + +on: + pull_request: + branches: + - main + - next + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + binary_linux: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v3 + with: + submodules: true + - run: rustup update && rustup target add aarch64-unknown-linux-gnu + - run: | + sudo apt update && sudo apt install -y g++-aarch64-linux-gnu + echo -e "\n\n[target.aarch64-unknown-linux-gnu]\nlinker = \"aarch64-linux-gnu-gcc\"" >> .cargo/config.toml + - uses: Swatinem/rust-cache@v2 + - uses: actions/setup-python@v4 + with: + python-version: "3.11" + cache: pip + cache-dependency-path: '**/requirements.dev.txt' + - run: pip install -r python/requirements.dev.txt + - run: maturin build --release --features abi3 + working-directory: ./python + - run: pip install --no-index --find-links=target/wheels/ pyoxigraph + - run: python generate_stubs.py pyoxigraph pyoxigraph.pyi --black + working-directory: ./python + - run: maturin build --release --features abi3 --compatibility manylinux2014 + working-directory: ./python + - run: maturin build --release --target aarch64-unknown-linux-gnu --features abi3 --compatibility manylinux2014 + working-directory: ./python + env: + BINDGEN_EXTRA_CLANG_ARGS: --sysroot /usr/aarch64-linux-gnu + # TODO TARGET_CC: /usr/bin/aarch64-linux-gnu-gcc + # TODO TARGET_AR: /usr/bin/aarch64-linux-gnu-ar + - uses: actions/upload-artifact@v3 + with: + name: pyoxigraph_wheel_x86_64_linux_gnu + path: target/wheels/*_x86_64.whl + - uses: actions/upload-artifact@v3 + with: + name: pyoxigraph_wheel_aarch64_linux_gnu + path: target/wheels/*_aarch64.whl + - uses: pypa/gh-action-pypi-publish@release/v1 + with: + user: __token__ + password: ${{ secrets.PYPI_PASSWORD }} + packages-dir: target/wheels + if: github.event_name == 'release' \ No newline at end of file diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a58e710c..fda6b9df 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,10 +1,6 @@ name: Change tests on: - pull_request: - branches: - - main - - next schedule: - cron: "12 3 * * *"