Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ This is implemented in [`nightly.yaml`](nightly.yaml)

In addition to the main workflows described above, there exist a number of modules that are used by these main workflows. They can also be run standalone, and are intendet to make composing the capabilities of our main workflows simpler. These are:

- [`check-up-spec-compatibility.yaml`](check-up-spec-compatibility.yaml) - checks if the current main branch can be built against up-spec's main branch instead of its latest tag/release
- [`coverage.yaml`](coverage.yaml) - collects test code coverage, and can optionally upload the results to codecov.io
- Will publish coverage data to CodeCov if `${{ secrets.CODECOV_TOKEN }}` is set
- outputs: download URL for the workflow-generated coverage info file
Expand Down
59 changes: 59 additions & 0 deletions .github/workflows/check-up-spec-compatibility.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# ********************************************************************************
# Copyright (c) 2024 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Apache License Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0
#
# SPDX-License-Identifier: Apache-2.0
# *******************************************************************************/

# Verifies that this crate can be built with the most recent changes from up-spec's main branch

name: uP Spec Compatibility

on:
schedule:
- cron: '0 4 * * *'
workflow_dispatch:

concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true

env:
RUST_TOOLCHAIN: ${{ vars.RUST_TOOLCHAIN || 'stable' }}
RUSTFLAGS: -Dwarnings
CARGO_TERM_COLOR: always

jobs:
nextest:
# Subset of feature-combos, on only one OS - more complete testing in test-featurematrix.yaml
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: "recursive"
- name: Fast-Forward to HEAD revision of uProtocol Spec main branch
run: |
cd "${{ github.workspace }}/up-spec"
echo "Switching to up-spec/main branch ..."
git checkout main
echo "fast-forwarding to HEAD revision ..."
git pull
git status
cd "${{ github.workspace }}"
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
- uses: Swatinem/rust-cache@v2
- uses: taiki-e/install-action@nextest
- name: Run tests
run: |
# Using nextest because it's faster than built-in test
cargo nextest run --all-features
# but it cannot execute doc tests
cargo test --doc --all-features