More resilient file saving by a two-stage file save process - Issues 1096, 1128 #3242
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
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
types: [opened, synchronize, reopened, ready_for_review] | |
workflow_dispatch: | |
workflow_call: | |
name: CI | |
jobs: | |
check: | |
if: github.event.pull_request.draft == false | |
runs-on: ubuntu-22.04 | |
container: fedora:40 | |
steps: | |
- name: Install dependencies | |
run: | | |
sudo dnf upgrade --refresh -y | |
sudo dnf install -y gcc gcc-c++ clang python3 make cmake meson git kernel-devel gtk4-devel libadwaita-devel poppler-glib-devel poppler-data alsa-lib-devel appstream-devel desktop-file-utils | |
- name: Install toolchain | |
id: toolchain | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
components: rustfmt, clippy | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Cache | |
uses: actions/cache@v3 | |
env: | |
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 10 | |
with: | |
path: | | |
_mesonbuild/cargo-home/bin/ | |
_mesonbuild/cargo-home/registry/index/ | |
_mesonbuild/cargo-home/registry/cache/ | |
_mesonbuild/cargo-home/git/db/ | |
_mesonbuild/target/ | |
key: cargo-${{ runner.os }}-${{ steps.toolchain.outputs.cachekey }}-${{ hashFiles('**/Cargo.lock') }}-${{ github.workflow_sha }} | |
restore-keys: cargo-${{ runner.os }}-${{ steps.toolchain.outputs.cachekey }} | |
- name: Setup | |
run: | | |
meson setup --prefix=/usr -Dprofile=devel -Dcli=true _mesonbuild | |
- name: Run fmt check | |
run: meson compile cargo-fmt-check -C _mesonbuild | |
- name: Compile | |
run: meson compile -v -C _mesonbuild | |
- name: Install | |
run: meson install -C _mesonbuild | |
- name: Run meson tests | |
run: meson test -v -C _mesonbuild | |
- name: Run clippy for UI | |
run: meson compile ui-cargo-clippy -C _mesonbuild | |
continue-on-error: true | |
- name: Run clippy for CLI | |
run: meson compile cli-cargo-clippy -C _mesonbuild | |
continue-on-error: true | |
- name: Run file compatibility tests | |
run: | | |
rnote-cli test\ | |
misc/file-tests/v0-5-5-test.rnote\ | |
misc/file-tests/v0-5-13-test.rnote\ | |
misc/file-tests/v0-6-0-test.rnote\ | |
misc/file-tests/v0-9-0-test.rnote\ |