Insert all-features with a boolean and not a string #1598
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-20.04] | |
toolchain: [stable] | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- name: Acquire source code | |
uses: actions/checkout@v2 | |
- 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@v1 | |
with: | |
path: ~/.cargo/registry | |
key: checks-${{ runner.os }}-cargo-registry-trimmed | |
- name: Cache cargo git trees | |
uses: actions/cache@v1 | |
with: | |
path: ~/.cargo/git | |
key: checks-${{ runner.os }}-cargo-gits-trimmed | |
- name: Cache cargo build | |
uses: actions/cache@v1 | |
with: | |
path: target | |
key: checks-${{ runner.os }}-cargo-target-dir-${{ steps.toolchain.outputs.rustc_hash }} | |
- name: Install packages from apt | |
run: | | |
sudo apt update | |
sudo apt install libgtk-3-dev libssh2-1-dev libglib2.0-dev libgraphene-1.0-dev libcairo-gobject2 libcairo2-dev | |
if: matrix.os == 'ubuntu-20.04' | |
- name: "Run clippy" | |
uses: actions-rs/cargo@v1 | |
with: | |
command: clippy | |
args: --release --tests -- -D warnings | |
if: matrix.os == 'ubuntu-20.04' | |
- name: "Run formatting check" | |
uses: actions-rs/cargo@v1 | |
with: | |
command: fmt | |
args: -- --check | |
if: matrix.os == 'ubuntu-20.04' | |
build: | |
name: "Build/Test" | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-20.04] | |
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@v2 | |
- 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@v1 | |
with: | |
path: ~/.cargo/registry | |
key: build-${{ runner.os }}-cargo-registry-trimmed | |
- name: Cache cargo git trees | |
uses: actions/cache@v1 | |
with: | |
path: ~/.cargo/git | |
key: build-${{ runner.os }}-cargo-gits-trimmed | |
- name: Cache cargo build | |
uses: actions/cache@v1 | |
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-3-dev libssh2-1-dev libglib2.0-dev libgraphene-1.0-dev libcairo-gobject2 libcairo2-dev | |
if: matrix.os == 'ubuntu-20.04' | |
- 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 }}-gtk3 mingw-w64-${{ matrix.arch }}-libgit2 | |
if: matrix.os == 'windows-latest' | |
- name: "Acquire gir-files" | |
uses: actions/checkout@v2 | |
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: "Test (tests/sys)" | |
run: tests/sys/test.sh | |
- name: "sys_build (Windows)" | |
run: | | |
cd tests/sys/sys_build | |
cargo build && cargo build --features v3_20 | |
if: matrix.os == 'windows-latest' | |
- name: "Acquire gtk3-rs" | |
uses: actions/checkout@v2 | |
with: | |
repository: gtk-rs/gtk3-rs | |
ref: master | |
path: gtk3-rs | |
if: matrix.os == 'ubuntu-20.04' | |
- name: "Symlink `gir` in gtk3-rs" | |
run: | | |
rmdir gtk3-rs/gir | |
ln -sf .. gtk3-rs/gir | |
- name: "Attempt to rebuild gtk3-rs gir" | |
run: cd gtk3-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-20.04' | |
- name: "Acquire gtk-rs-core" | |
uses: actions/checkout@v2 | |
with: | |
repository: gtk-rs/gtk-rs-core | |
ref: master | |
path: gtk-rs-core | |
if: matrix.os == 'ubuntu-20.04' | |
- 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-20.04' |