From 0e8910807eb7ad3aa7f7a2925bcee5d5561b513d Mon Sep 17 00:00:00 2001 From: Shaun Reed Date: Sat, 21 Feb 2026 15:06:08 -0500 Subject: [PATCH] Add CI. --- .cargo/config.toml | 4 -- .github/actions/setup-qt/action.yml | 20 +++++++++ .github/workflows/build.yaml | 67 +++++++++++++++++++++++++++++ README.md | 2 + 4 files changed, 89 insertions(+), 4 deletions(-) create mode 100644 .github/actions/setup-qt/action.yml create mode 100644 .github/workflows/build.yaml diff --git a/.cargo/config.toml b/.cargo/config.toml index 6a03545..2f415a1 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,6 +1,2 @@ [build] rustflags = [ "-C", "link-arg=-fuse-ld=lld", ] - -[env] -QMAKE="/opt/Qt/6.7.3/gcc_64/bin/qmake6" -LD_LIBRARY_PATH="/opt/Qt/6.7.3/gcc_64/lib" diff --git a/.github/actions/setup-qt/action.yml b/.github/actions/setup-qt/action.yml new file mode 100644 index 0000000..ff84d38 --- /dev/null +++ b/.github/actions/setup-qt/action.yml @@ -0,0 +1,20 @@ +name: "Setup Qt" +description: "Install clide dependencies" +inputs: + qt-version: + description: "Qt version to install" + required: true + +runs: + using: "composite" + steps: + - name: Install apt packages + run: | + sudo apt update -y + sudo apt install -y build-essential cmake curl libgl1-mesa-dev python3 python3-pip + shell: bash + + - name: Install Qt + uses: jurplel/install-qt-action@v4 + with: + version: ${{ inputs.qt-version }} diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 0000000..29ad7fa --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,67 @@ +name: Build + +on: + push: + branches: + - '**' + tags: + - 'v*' + pull_request: + +env: + QT_VERSION: 6.7.3 + +jobs: + Build: + name: Build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + + - name: Setup Qt + uses: ./.github/actions/setup-qt + with: + qt-version: ${{ env.QT_VERSION }} + + - name: Build libclide + run: | + cargo b -p libclide --release + - name: Build clide + run: | + cargo b --release + + Test: + name: Test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + + - name: Setup Qt + uses: ./.github/actions/setup-qt + with: + qt-version: ${{ env.QT_VERSION }} + + - name: Test libclide + run: | + cargo test -p libclide + - name: Test clide + run: | + cargo test + + Lint: + name: Lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + + - name: Setup Qt + uses: ./.github/actions/setup-qt + with: + qt-version: ${{ env.QT_VERSION }} + + - name: Lint libclide + run: | + cargo clippy --manifest-path libclide/Cargo.toml -- -D warnings + - name: Lint clide + run: | + cargo clippy -- -D warnings diff --git a/README.md b/README.md index 2bb4dfc..0e9d996 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # CLIDE +[![Build](https://git.shaunreed.com/shaunrd0/clide/actions/workflows/build.yaml/badge.svg)](https://git.shaunreed.com/shaunrd0/clide/workflows/build.yml) + CLIDE is an extendable command-line driven development environment written in Rust using the Qt UI framework that supports both full and headless Linux environments. The GUI is written in QML compiled through Rust using the cxx-qt crate, while the TUI was implemented using the ratatui crate.