Skip to content

codegen: Add type annotation to prop get/set #240

codegen: Add type annotation to prop get/set

codegen: Add type annotation to prop get/set #240

name: Dbus-rs-ci
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
env:
CARGO_TERM_COLOR: always
jobs:
# Taken from rust-lang/libz-sys CI/CD example.
#
# This job downloads and stores `cross` as an artifact, so that it can be
# redownloaded across all of the jobs.
install-cross:
runs-on: ubuntu-latest
steps:
- uses: XAMPPRocky/get-github-release@v1
id: cross
with:
owner: rust-embedded
repo: cross
matches: ${{ matrix.platform }}
token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/upload-artifact@v3
with:
name: cross-${{ matrix.platform }}
path: ${{ steps.cross.outputs.install_path }}
strategy:
matrix:
platform: [linux-musl]
# Cross compile vendored libdbus for multiple architectures.
#
# Cannot run the full dbus test suite since the cross docker image doesn't
# have dbus-daemon running.
libdbus-sys-linux:
runs-on: ubuntu-latest
needs: install-cross
steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- name: Download Cross
uses: actions/download-artifact@v3
with:
name: cross-linux-musl
path: /tmp
- run: rustup toolchain install ${{ matrix.channel }}
- run: chmod +x /tmp/cross
- name: Build
run: /tmp/cross build --package dbus --features vendored --target ${{ matrix.target }}
- name: Run tests
run: /tmp/cross test --package libdbus-sys --features vendored --target ${{ matrix.target }}
strategy:
fail-fast: false
matrix:
channel: [stable]
target:
- aarch64-unknown-linux-musl
- arm-unknown-linux-musleabihf
- i686-unknown-linux-musl
- x86_64-unknown-linux-musl
- x86_64-unknown-linux-gnu
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install --no-install-recommends -y libdbus-1-dev dbus at-spi2-core
- name: Check
run: cargo check --verbose --all
- name: Run tests
run: |
export DBUS_SESSION_BUS_ADDRESS=`dbus-daemon --session --print-address --fork`
cargo test --all -- --nocapture --color always
cargo test --features stdfd --all -- --nocapture --color always
cd dbus-codegen && cargo test --all --no-default-features -- --nocapture --color always
build-mingw:
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
steps:
- uses: msys2/setup-msys2@v2
with:
install: >-
git
mingw-w64-x86_64-dbus
mingw-w64-x86_64-pkgconf
mingw-w64-x86_64-rust
- uses: actions/checkout@v3
- name: Run tests
run: |
# dbus-daemon has no '--fork' option on windows. But it will autolaunch
cd dbus && cargo test --lib -- --nocapture --color always