Skip to content

Commit 7df5732

Browse files
authored
Merge pull request #530 from JuliaControl/standard_ci_workflow
CI: reverting to old `CI.yml` and `Documentation.yml` workflows
2 parents de351a0 + 26a30ae commit 7df5732

5 files changed

Lines changed: 104 additions & 26 deletions

File tree

‎.github/workflows/CI.yml‎

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: CI
2+
on:
3+
push:
4+
branches:
5+
- main
6+
tags: ['*']
7+
pull_request:
8+
concurrency:
9+
# Skip intermediate builds: always.
10+
# Cancel intermediate builds: only if it is a pull request build.
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
13+
jobs:
14+
test:
15+
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
16+
runs-on: ${{ matrix.os }}
17+
permissions: # needed for julia-actions/cache delete old caches that it has created
18+
actions: write
19+
contents: read
20+
continue-on-error: ${{ matrix.version == 'pre' }}
21+
strategy:
22+
fail-fast: false
23+
matrix:
24+
version:
25+
- 'lts' # long-term support release
26+
- '1' # latest stable 1.x release
27+
- 'pre' # latest stable prerelease
28+
# - 'nightly' # commented since noisy + 'pre' allows testing upcoming versions
29+
os:
30+
- ubuntu-latest
31+
- macos-latest
32+
- windows-latest
33+
arch:
34+
- x64
35+
- aarch64
36+
exclude:
37+
- os: ubuntu-latest
38+
arch: aarch64
39+
- os: macos-latest
40+
arch: x64
41+
- os: macos-latest
42+
version: pre
43+
- os: windows-latest
44+
arch: aarch64
45+
- os: windows-latest
46+
version: pre
47+
steps:
48+
- name: Set JULIA_DEBUG environment variable if applicable
49+
if: ${{ runner.debug == '1' }}
50+
run: echo "JULIA_DEBUG=ModelPredictiveControl" >> $GITHUB_ENV
51+
- uses: actions/checkout@v7
52+
- uses: julia-actions/setup-julia@v3
53+
with:
54+
version: ${{ matrix.version }}
55+
arch: ${{ matrix.arch }}
56+
- uses: actions/cache@v6
57+
env:
58+
cache-name: cache-artifacts
59+
with:
60+
path: ~/.julia/artifacts
61+
key: ${{ runner.os }}-${{ matrix.arch }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
62+
restore-keys: |
63+
${{ runner.os }}-${{ matrix.arch }}-test-${{ env.cache-name }}-
64+
${{ runner.os }}-${{ matrix.arch }}-test-
65+
${{ runner.os }}-${{ matrix.arch }}-
66+
${{ runner.os }}-
67+
- uses: julia-actions/julia-buildpkg@v1
68+
- uses: julia-actions/julia-runtest@v1
69+
- uses: julia-actions/julia-processcoverage@v1
70+
- uses: codecov/codecov-action@v7
71+
with:
72+
token: ${{ secrets.CODECOV_TOKEN }}
73+
fail_ci_if_error: false
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Documentation
2+
3+
on:
4+
push:
5+
branches:
6+
- main # update to match your development branch (master, main, dev, trunk, ...)
7+
tags: '*'
8+
pull_request:
9+
10+
jobs:
11+
build:
12+
name: Documentation
13+
permissions:
14+
contents: write
15+
statuses: write
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v7
19+
- uses: julia-actions/setup-julia@v3
20+
with:
21+
version: '1'
22+
- uses: julia-actions/cache@v3
23+
- uses: julia-actions/julia-docdeploy@v1
24+
env:
25+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

‎.github/workflows/juliaci.yml‎

Lines changed: 0 additions & 23 deletions
This file was deleted.

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
# ModelPredictiveControl.jl
88

9-
[![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)
9+
[![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)
1010
[![codecov](https://codecov.io/gh/JuliaControl/ModelPredictiveControl.jl/branch/main/graph/badge.svg?token=K4V0L113M4)](https://codecov.io/gh/JuliaControl/ModelPredictiveControl.jl)
1111
[![Aqua QA](https://juliatesting.github.io/Aqua.jl/dev/assets/badge.svg)](https://github.com/JuliaTesting/Aqua.jl)
1212
[![doc-stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://JuliaControl.github.io/ModelPredictiveControl.jl/stable)

‎test/3_test_predictive_control.jl‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -729,7 +729,7 @@ end
729729

730730
@testitem "ExplicitMPC autodiff" setup=[SetupMPCtests] begin
731731
using .SetupMPCtests, ControlSystemsBase, LinearAlgebra
732-
using ForwardDiff
732+
using Logging, ForwardDiff
733733

734734
A = [0.9 0.08; -0.15 0.75]
735735
Bu = [0.005, 0.09]
@@ -743,7 +743,10 @@ end
743743
return moveinput!(mpc, [1.0])[1]
744744
end
745745
@test_nowarn first_move(0.5)
746-
@test_nowarn ForwardDiff.derivative(first_move, 0.5)
746+
errorlogger = ConsoleLogger(stderr, Logging.Error)
747+
@test_nowarn with_logger(errorlogger) do
748+
ForwardDiff.derivative(first_move, 0.5)
749+
end
747750

748751
end
749752

0 commit comments

Comments
 (0)