xkeysym 0.2.1

A library for working with X11 keysyms
Documentation
# SPDX-License-Identifier: MIT OR Apache-2.0 OR Zlib
# Copyright 2022-2023 John Nunley
#
# Licensed under the Apache License, Version 2.0, the MIT License, and
# the Zlib license ("the Licenses"), you may not use this file except in
# compliance with one of the the Licenses, at your option. You may obtain
#  a copy of the Licenses at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#     http://opensource.org/licenses/MIT
#     http://opensource.org/licenses/Zlib
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the Licenses is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the Licenses for the specific language governing permissions and
# limitations under the Licenses.

name: CI

permissions:
  contents: read
on:
  push:
    branches:
      - master
  pull_request:
  workflow_dispatch:

env:
  RUSTFLAGS: -Dwarnings
  CARGO_TERM_COLOR: always

jobs:
  codegen:
    name: codegen
    runs-on: ubuntu-latest
    permissions:
      contents: write
      pull-requests: write
    steps:
      - uses: actions/checkout@v4
      - uses: taiki-e/install-action@v2
        with:
          tool: just@1.15.0
      - name: Run codegen
        run: just
      - name: Check for git changes
        run: if ! git diff --exit-code; then exit 1; fi

  CI:
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        rust:
          - stable
          - beta
          - nightly
          - 1.58.1
    
    steps:
      - uses: actions/checkout@v4
        with:
          submodules: true
      - name: Install Rust
        uses: dtolnay/rust-toolchain@master
        with:
          toolchain: ${{ matrix.rust }}
          components: rustfmt, clippy
      - uses: Swatinem/rust-cache@v2
      - name: Run rustfmt
        if: matrix.rust == 'stable' # Avoid differences between the versions
        run: cargo fmt --check
      - name: Run Clippy
        if: matrix.rust == 'stable' # Avoid differences between the versions
        run: cargo clippy --all-features
      - name: Check clippy lints for the examples
        if: matrix.rust == 'stable' # Avoid differences between the versions
        run: cargo clippy --all-features --examples
      - name: Check clippy lints for the tests
        if: matrix.rust == 'stable' # Avoid differences between the versions
        run: cargo clippy --all-features --tests
      - name: Build the crate
        run: cargo build --all-features
      - name: Build the examples
        run: cargo build --all-features --examples
      - name: Run the tests
        run: cargo test
      - name: Run the tests with all features enabled
        run: cargo test --all-features
      - name: Build the docs
        run: cargo doc
      - name: Build the docs with all features enabled
        run: cargo doc --all-features