Continuous Integration

We recommend that you establish a CI build for your Relm4 app. This guide describes how to do it, and the caveats you must observe to make the build work.

GitHub Actions

Starting with Relm 0.6.1, you can set up a CI build for your app on GitHub Actions.

We recommend that you use the gtk4-rs container approach, as shown below:

name: Rust

    branches: [ "main" ]
    branches: [ "main" ]

    runs-on: ubuntu-latest
      image: # TODO enable minor version tags / pinning
    - uses: actions/checkout@v3
    - uses: actions-rs/toolchain@v1
        profile: minimal
        toolchain: stable
    - name: Build
      run: cargo build
    - name: Test
      run: cargo test

Note: You can alternatively just run the cargo build on the ubuntu-latest base image. However, this will tie your Relm app's GNOME and GTK version to Ubuntu's 2-year LTS release cycle, so you will not be able to use newer GNOME / GTK versions in the meantime. We therefore recommend that most projects use the gtk4-rs container approach instead.