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
73 changes: 73 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: CI
on:
push:
branches:
- main
tags: ['*']
pull_request:
concurrency:
# Skip intermediate builds: always.
# Cancel intermediate builds: only if it is a pull request build.
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
permissions: # needed for julia-actions/cache delete old caches that it has created
actions: write
contents: read
continue-on-error: ${{ matrix.version == 'pre' }}
strategy:
fail-fast: false
matrix:
version:
- 'lts' # long-term support release
- '1' # latest stable 1.x release
- 'pre' # latest stable prerelease
# - 'nightly' # commented since noisy + 'pre' allows testing upcoming versions
os:
- ubuntu-latest
- macos-latest
- windows-latest
arch:
- x64
- aarch64
exclude:
- os: ubuntu-latest
arch: aarch64
- os: macos-latest
arch: x64
- os: macos-latest
version: pre
- os: windows-latest
arch: aarch64
- os: windows-latest
version: pre
steps:
- name: Set JULIA_DEBUG environment variable if applicable
if: ${{ runner.debug == '1' }}
run: echo "JULIA_DEBUG=ModelPredictiveControl" >> $GITHUB_ENV
- uses: actions/checkout@v7
- uses: julia-actions/setup-julia@v3
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: actions/cache@v6
env:
cache-name: cache-artifacts
with:
path: ~/.julia/artifacts
key: ${{ runner.os }}-${{ matrix.arch }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
restore-keys: |
${{ runner.os }}-${{ matrix.arch }}-test-${{ env.cache-name }}-
${{ runner.os }}-${{ matrix.arch }}-test-
${{ runner.os }}-${{ matrix.arch }}-
${{ runner.os }}-
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v7
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false
25 changes: 25 additions & 0 deletions .github/workflows/Documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Documentation

on:
push:
branches:
- main # update to match your development branch (master, main, dev, trunk, ...)
tags: '*'
pull_request:

jobs:
build:
name: Documentation
permissions:
contents: write
statuses: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: julia-actions/setup-julia@v3
with:
version: '1'
- uses: julia-actions/cache@v3
- uses: julia-actions/julia-docdeploy@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
23 changes: 0 additions & 23 deletions .github/workflows/juliaci.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

# ModelPredictiveControl.jl

[![Build Status](https://github.com/JuliaControl/ModelPredictiveControl.jl/actions/workflows/juliaci.yml/badge.svg?branch=main)](https://github.com/JuliaControl/ModelPredictiveControl.jl/actions/workflows/juliaci.yml?query=branch%3Amain)
[![Build Status](https://github.com/JuliaControl/ModelPredictiveControl.jl/actions/workflows/CI.yml/badge.svg?branch=main)](https://github.com/JuliaControl/ModelPredictiveControl.jl/actions/workflows/juliaci.yml?query=branch%3Amain)
[![codecov](https://codecov.io/gh/JuliaControl/ModelPredictiveControl.jl/branch/main/graph/badge.svg?token=K4V0L113M4)](https://codecov.io/gh/JuliaControl/ModelPredictiveControl.jl)
[![Aqua QA](https://juliatesting.github.io/Aqua.jl/dev/assets/badge.svg)](https://github.com/JuliaTesting/Aqua.jl)
[![doc-stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://JuliaControl.github.io/ModelPredictiveControl.jl/stable)
Expand Down
7 changes: 5 additions & 2 deletions test/3_test_predictive_control.jl
Original file line number Diff line number Diff line change
Expand Up @@ -729,7 +729,7 @@ end

@testitem "ExplicitMPC autodiff" setup=[SetupMPCtests] begin
using .SetupMPCtests, ControlSystemsBase, LinearAlgebra
using ForwardDiff
using Logging, ForwardDiff

A = [0.9 0.08; -0.15 0.75]
Bu = [0.005, 0.09]
Expand All @@ -743,7 +743,10 @@ end
return moveinput!(mpc, [1.0])[1]
end
@test_nowarn first_move(0.5)
@test_nowarn ForwardDiff.derivative(first_move, 0.5)
errorlogger = ConsoleLogger(stderr, Logging.Error)
@test_nowarn with_logger(errorlogger) do
ForwardDiff.derivative(first_move, 0.5)
end

end

Expand Down
Loading