Skip to content

Commit

Permalink
codecov update
Browse files Browse the repository at this point in the history
  • Loading branch information
ThummeTo committed Aug 28, 2024
1 parent 41765af commit ab06fcf
Show file tree
Hide file tree
Showing 6 changed files with 73 additions and 220 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/TestLTS.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Test v1.6 (LTS)

on:
workflow_dispatch:
pull_request:
push:
branches:
- main
paths:
- 'src/**'
- 'test/**'
- '.github/workflows/Test.yml'
- 'Project.toml'

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
julia-version: ['1.6']
julia-arch: [x64]
os: [ubuntu-latest, windows-latest]
experimental: [false]

steps:
# Checks-out your repository
- name: Check out repository
uses: actions/checkout@v3

# Set up Julia
- name: "Set up Julia"
uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.julia-version }}
arch: ${{ matrix.julia-arch }}

# Set up cache
- name: "Set up cache"
uses: actions/cache@v3
env:
cache-name: cache-artifacts
with:
path: ~/.julia/artifacts
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
restore-keys: |
${{ runner.os }}-test-${{ env.cache-name }}-
${{ runner.os }}-test-
${{ runner.os }}-
# Build package
- name: "Build package"
uses: julia-actions/julia-buildpkg@v1

# Run the tests
- name: "Run tests"
uses: julia-actions/julia-runtest@v1
14 changes: 8 additions & 6 deletions .github/workflows/Test.yml → .github/workflows/TestLatest.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Run Tests
name: Test v1 (latest)

on:
workflow_dispatch:
Expand All @@ -9,7 +9,7 @@ on:
paths:
- 'src/**'
- 'test/**'
- '.github/**'
- '.github/workflows/Test.yml'
- 'Project.toml'

jobs:
Expand All @@ -18,7 +18,7 @@ jobs:
strategy:
fail-fast: false
matrix:
julia-version: ['1.6', '1']
julia-version: ['1']
julia-arch: [x64]
os: [ubuntu-latest, windows-latest]
experimental: [false]
Expand All @@ -35,7 +35,7 @@ jobs:
version: ${{ matrix.julia-version }}
arch: ${{ matrix.julia-arch }}

# Set up cache
# Set up cache
- name: "Set up cache"
uses: actions/cache@v3
env:
Expand All @@ -47,7 +47,7 @@ jobs:
${{ runner.os }}-test-${{ env.cache-name }}-
${{ runner.os }}-test-
${{ runner.os }}-
# Build package
- name: "Build package"
uses: julia-actions/julia-buildpkg@v1
Expand All @@ -62,6 +62,8 @@ jobs:

# Run codecov
- name: "Run CodeCov"
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
file: lcov.info
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@


[![Dev Docs](https://img.shields.io/badge/docs-dev-blue.svg)](https://thummeto.github.io/FMI.jl/dev/)
[![Run Tests](https://github.com/ThummeTo/FMIImport.jl/actions/workflows/Test.yml/badge.svg)](https://github.com/ThummeTo/FMIImport.jl/actions/workflows/Test.yml)
[![Test (latest)](https://github.com/ThummeTo/FMIImport.jl/actions/workflows/TestLatest.yml/badge.svg)](https://github.com/ThummeTo/FMIImport.jl/actions/workflows/TestLatest.yml)
[![Test (LTS)](https://github.com/ThummeTo/FMIImport.jl/actions/workflows/TestLTS.yml/badge.svg)](https://github.com/ThummeTo/FMIImport.jl/actions/workflows/TestLTS.yml)
[![Run PkgEval](https://github.com/ThummeTo/FMIImport.jl/actions/workflows/Eval.yml/badge.svg)](https://github.com/ThummeTo/FMIImport.jl/actions/workflows/Eval.yml)
[![Coverage](https://codecov.io/gh/ThummeTo/FMIImport.jl/branch/main/graph/badge.svg)](https://app.codecov.io/gh/ThummeTo/FMIImport.jl)
[![ColPrac: Contributor's Guide on Collaborative Practices for Community Packages](https://img.shields.io/badge/ColPrac-Contributor's%20Guide-blueviolet)](https://github.com/SciML/ColPrac)
Expand Down
1 change: 0 additions & 1 deletion src/FMIImport.jl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import FMIBase.ChainRulesCore: ignore_derivatives
using RelocatableFolders

import FMIBase: EzXML
include("convert.jl")
include("zip.jl")
include("binary.jl")
include("md_parse.jl")
Expand Down
11 changes: 6 additions & 5 deletions src/binary.jl
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ function loadFMU(
unpackPath::Union{String,Nothing} = nothing,
cleanup::Bool = true,
type::Union{Symbol,Nothing} = nothing,
kwargs...
)

unzippedAbsPath, zipAbsPath =
Expand All @@ -72,11 +73,11 @@ function loadFMU(
version = root["fmiVersion"]

if version == "1.0"
@assert false "FMI version 1.0 deteted, this is (currently) not supported by FMI.jl."
@assert false "FMI version 1.0 detected, this is (currently) not supported by FMI.jl."
elseif version == "2.0"
return createFMU2(unzippedAbsPath, zipAbsPath; type = type)
return createFMU2(unzippedAbsPath, zipAbsPath; type = type, kwargs...)
elseif version == "3.0"
return createFMU3(unzippedAbsPath, zipAbsPath; type = type)
return createFMU3(unzippedAbsPath, zipAbsPath; type = type, kwargs...)
else
@assert false, "Unknwon FMI version `$(version)`."
end
Expand Down Expand Up @@ -113,7 +114,7 @@ function unloadFMU(fmu::FMU2, cleanUp::Bool = true; secure_pointers::Bool = true
end

# the components are removed from the component list via call to fmi2FreeInstance!
@assert length(fmu.components) == 0 "fmi2Unload(...): Failure during deleting components, $(length(fmu.components)) remaining in stack."
@assert length(fmu.components) == 0 "unloadFMU(fmu::FMU2, ...): Failure during deleting components, $(length(fmu.components)) remaining in stack."

if secure_pointers
unloadPointers(fmu)
Expand All @@ -139,7 +140,7 @@ function unloadFMU(fmu::FMU3, cleanUp::Bool = true)
dlclose(fmu.libHandle)

# the instances are removed from the instances list via call to fmi3FreeInstance!
@assert length(fmu.instances) == 0 "fmi3Unload(...): Failure during deleting instances, $(length(fmu.instances)) remaining in stack."
@assert length(fmu.instances) == 0 "unloadFMU(fmu::FMU3, ...): Failure during deleting instances, $(length(fmu.instances)) remaining in stack."

if cleanUp
try
Expand Down
207 changes: 0 additions & 207 deletions src/convert.jl

This file was deleted.

0 comments on commit ab06fcf

Please sign in to comment.