bundle libsqlite3-sys in tests? #52
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "test build" | |
on: | |
push: | |
branches: | |
- main | |
permissions: | |
contents: read | |
jobs: | |
test-ubuntu: | |
name: Testing ubuntu-latest | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
- run: cargo build --examples --verbose | |
- run: cargo test | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: ubuntu-latest-exts | |
path: | | |
target/debug/examples/libcharacters.* | |
target/debug/examples/libhello.* | |
target/debug/examples/libscalar.* | |
target/debug/examples/libseries.* | |
test-linux-cross: | |
name: Testing on ${{matrix.target}} | |
runs-on: ubuntu-20.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
target: | |
- x86_64-unknown-linux-gnu | |
- x86_64-unknown-linux-musl | |
- aarch64-unknown-linux-gnu | |
#- aarch64-unknown-linux-musl # cannot produce cdylib for ... as the target `aarch64-unknown-linux-musl` does not support these crate types | |
- arm-unknown-linux-gnueabihf | |
#- arm-unknown-linux-gnueabi # "failed to merge target specific data of file ..." | |
- armv7-unknown-linux-gnueabihf | |
#- armv7-unknown-linux-musleabihf # "cannot produce cdylib ... as the target `armv7-unknown-linux-musleabihf` does not support these crate types" | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
- run: sudo apt-get update && sudo apt-get install -qq crossbuild-essential-arm64 crossbuild-essential-armhf gcc-arm-linux-gnueabi musl-tools | |
- run: rustup target add ${{ matrix.target }} | |
- run: cargo build --examples --verbose --target ${{ matrix.target }} | |
env: | |
RUSTFLAGS: "-C target-feature=-crt-static" | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: ${{ matrix.target }} | |
path: | | |
target/${{ matrix.target }}/debug/examples/libcharacters.so | |
target/${{ matrix.target }}/debug/examples/libhello.so | |
target/${{ matrix.target }}/debug/examples/libscalar.so | |
target/${{ matrix.target }}/debug/examples/libseries.so | |
test-macos: | |
name: Testing macos-latest | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
- run: cargo build --examples --verbose | |
- run: cargo test | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: macos-latest-exts | |
path: | | |
target/debug/examples/libcharacters.* | |
target/debug/examples/libhello.* | |
target/debug/examples/libscalar.* | |
target/debug/examples/libseries.* | |
test-windows: | |
name: Testing windows-latest | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
- run: cargo build --examples --verbose | |
- run: cargo test | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: windows-latest-exts | |
path: | | |
target/debug/examples/characters.* | |
target/debug/examples/hello.* | |
target/debug/examples/scalar.* | |
target/debug/examples/series.* |