Use getter and setter annotations #1797
Workflow file for this run
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: "gir" | |
on: | |
pull_request: | |
branches: | |
- "*" | |
push: | |
branches: | |
- "master" | |
jobs: | |
hygiene: | |
name: Hygiene | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
toolchain: [stable] | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- name: Acquire source code | |
uses: actions/checkout@v4 | |
- name: Acquire Rust toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: ${{ matrix.toolchain }} | |
override: true | |
profile: minimal | |
components: rustfmt, clippy | |
id: toolchain | |
- name: Cache cargo registry | |
uses: actions/cache@v4 | |
with: | |
path: ~/.cargo/registry | |
key: checks-${{ runner.os }}-cargo-registry-trimmed | |
- name: Cache cargo git trees | |
uses: actions/cache@v4 | |
with: | |
path: ~/.cargo/git | |
key: checks-${{ runner.os }}-cargo-gits-trimmed | |
- name: Cache cargo build | |
uses: actions/cache@v4 | |
with: | |
path: target | |
key: checks-${{ runner.os }}-cargo-target-dir-${{ steps.toolchain.outputs.rustc_hash }} | |
- name: "Run clippy" | |
uses: actions-rs/cargo@v1 | |
with: | |
command: clippy | |
args: --release --tests -- -D warnings | |
if: matrix.os == 'ubuntu-latest' | |
- name: "Run formatting check" | |
uses: actions-rs/cargo@v1 | |
with: | |
command: fmt | |
args: -- --check | |
if: matrix.os == 'ubuntu-latest' | |
build: | |
name: "Build/Test" | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
toolchain: [nightly, stable] | |
# include: | |
# - os: windows-latest | |
# toolchain: stable-i686-pc-windows-gnu | |
# bits: 32 | |
# arch: i686 | |
# - os: windows-latest | |
# toolchain: stable-x86_64-pc-windows-gnu | |
# bits: 64 | |
# arch: x86_64 | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- name: Acquire source code | |
uses: actions/checkout@v4 | |
- name: Acquire Rust toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: ${{ matrix.toolchain }} | |
override: true | |
profile: minimal | |
id: toolchain | |
- name: Install MSYS2 | |
uses: numworks/setup-msys2@v1 | |
if: matrix.os == 'windows-latest' | |
- name: Set up MSYS2 path and other windows env | |
run: | | |
echo "::add-path::$RUNNER_TEMP\\msys\\msys64\\usr\\bin" | |
echo "::add-path::$RUNNER_TEMP\\msys\\msys64\\mingw${{ matrix.bits }}\\bin" | |
echo "::set-env name=LIBGIT2_SYS_USE_PKG_CONFIG::1" | |
if: matrix.os == 'windows-latest' | |
- name: Cache cargo registry | |
uses: actions/cache@v4 | |
with: | |
path: ~/.cargo/registry | |
key: build-${{ runner.os }}-cargo-registry-trimmed | |
- name: Cache cargo git trees | |
uses: actions/cache@v4 | |
with: | |
path: ~/.cargo/git | |
key: build-${{ runner.os }}-cargo-gits-trimmed | |
- name: Cache cargo build | |
uses: actions/cache@v4 | |
with: | |
path: target | |
key: build-${{ runner.os }}-cargo-target-dir-${{ steps.toolchain.outputs.rustc_hash }} | |
- name: Install packages from apt | |
run: | | |
sudo apt update | |
sudo apt install libgtk-4-dev libssh2-1-dev libglib2.0-dev libgraphene-1.0-dev libcairo-gobject2 libcairo2-dev | |
if: matrix.os == 'ubuntu-latest' | |
- name: Install toolchain packages with pacman | |
run: pacman --noconfirm -S base-devel mingw-w64-${{ matrix.arch }}-toolchain | |
if: matrix.os == 'windows-latest' | |
- name: Install library devel packages with pacman | |
run: pacman --noconfirm -S mingw-w64-${{ matrix.arch }}-libgit2 | |
if: matrix.os == 'windows-latest' | |
- name: "Acquire gir-files" | |
uses: actions/checkout@v4 | |
with: | |
repository: gtk-rs/gir-files | |
ref: master | |
path: tests/gir-files | |
- name: "Build (release)" | |
uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
args: --release | |
- name: "Test (release)" | |
uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
args: --release | |
- name: "Acquire gtk4-rs" | |
uses: actions/checkout@v4 | |
with: | |
repository: gtk-rs/gtk4-rs | |
ref: master | |
path: gtk4-rs | |
if: matrix.os == 'ubuntu-latest' | |
- name: "Symlink `gir` in gtk4-rs" | |
run: | | |
rmdir gtk4-rs/gir | |
ln -sf .. gtk4-rs/gir | |
- name: "Attempt to rebuild gtk4-rs gir" | |
run: cd gtk4-rs && python3 generator.py --no-fmt --gir-path ../target/release/gir --gir-files-directories ../tests/gir-files/ && rm ../Cargo.* && cargo build | |
if: matrix.os == 'ubuntu-latest' | |
- name: "Acquire gtk-rs-core" | |
uses: actions/checkout@v4 | |
with: | |
repository: gtk-rs/gtk-rs-core | |
ref: master | |
path: gtk-rs-core | |
if: matrix.os == 'ubuntu-latest' | |
- name: "Symlink `gir` in gtk-rs-core" | |
run: | | |
rmdir gtk-rs-core/gir | |
ln -sf .. gtk-rs-core/gir | |
- name: "Rebuild gio" | |
run: cd gtk-rs-core/gio && cargo test | |
if: matrix.os == 'ubuntu-latest' |