Skip to content

Commit

Permalink
Update Callback-Binary Build Workflow (#113)
Browse files Browse the repository at this point in the history
* add 32 bit workflow for windows

* add targetplatform

* fix

* how does matrix work

* typo

* fix names

* bump git action versions

* a

* add manual workflow trigger

* add manual trigger

* Update callbackFunctions

* Update Project.toml

---------

Co-authored-by: halentin <[email protected]>
Co-authored-by: ThummeTo <[email protected]>
  • Loading branch information
3 people authored Jun 18, 2024
1 parent dc16f48 commit debe082
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 13 deletions.
44 changes: 32 additions & 12 deletions .github/workflows/callbackFunctions.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: CallbackFunctions

on:
workflow_dispatch:
pull_request:
push:
branches:
Expand All @@ -15,17 +16,21 @@ jobs:
fail-fast: true
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
arch: ['']
include:
- os: windows-latest
arch: -A Win32
env:
BUILD_TYPE: RelWithDebInfo
CMAKE_SOURCE_DIR: ${{github.workspace}}/src/FMI2/callbackFunctions
CMAKE_INSTALL_DIR: ${{github.workspace}}/src/FMI2/callbackFunctions

steps:
- name: Check out repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Configure CMake
run: cmake -S ${{env.CMAKE_SOURCE_DIR}}/callbackFunctions -B ${{env.CMAKE_SOURCE_DIR}}/callbackFunctions/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
run: cmake -S ${{env.CMAKE_SOURCE_DIR}}/callbackFunctions -B ${{env.CMAKE_SOURCE_DIR}}/callbackFunctions/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} ${{ matrix.arch }}

- name: Build C++ Sources
run: cmake --build ${{env.CMAKE_SOURCE_DIR}}/callbackFunctions/build --config ${{env.BUILD_TYPE}} --target install
Expand All @@ -39,22 +44,29 @@ jobs:
run: ${{env.CMAKE_SOURCE_DIR}}/callbackFunctions/build/test

- name: Archive production artifacts (win)
if: success() && matrix.os == 'windows-latest'
uses: actions/upload-artifact@v3
if: success() && matrix.os == 'windows-latest' && matrix.arch == ''
uses: actions/upload-artifact@v4
with:
name: callbackFunctions-win-binaries
path: src/FMI2/callbackFunctions/binaries/win64/

- name: Archive production artifacts (win32)
if: success() && matrix.os == 'windows-latest' && matrix.arch != ''
uses: actions/upload-artifact@v4
with:
name: callbackFunctions-win32-binaries
path: src/FMI2/callbackFunctions/binaries/win32/

- name: Archive production artifacts (linux)
if: success() && matrix.os == 'ubuntu-latest'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: callbackFunctions-linux-binaries
path: src/FMI2/callbackFunctions/binaries/linux64/

- name: Archive production artifacts (darwin)
if: success() && matrix.os == 'macos-latest'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: callbackFunctions-mac-binaries
path: src/FMI2/callbackFunctions/binaries/darwin64/
Expand All @@ -64,29 +76,37 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Download windows binaries
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: callbackFunctions-win-binaries
path: src/FMI2/callbackFunctions/binaries/win64/

- name: Download windows x86 binaries
uses: actions/download-artifact@v4
with:
name: callbackFunctions-win32-binaries
path: src/FMI2/callbackFunctions/binaries/win32/

- name: Download linux binaries
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: callbackFunctions-linux-binaries
path: src/FMI2/callbackFunctions/binaries/linux64/

- name: Download darwin binaries
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: callbackFunctions-mac-binaries
path: src/FMI2/callbackFunctions/binaries/darwin64/

- name: "Auto commit"
if: ${{ github.event_name == 'push' }}
uses: stefanzweifel/git-auto-commit-action@v4
if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch'}}
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Update callbackFunctions
push_options: '--force-with-lease'


2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "FMIImport"
uuid = "9fcbc62e-52a0-44e9-a616-1359a0008194"
authors = ["TT <[email protected]>", "LM <[email protected]>", "JK <[email protected]>"]
version = "1.0.0"
version = "1.0.1"

[deps]
Downloads = "f43a241f-c20a-4ad4-852c-f6b1247861c6"
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified src/FMI2/callbackFunctions/binaries/win64/callbackFunctions.dll
Binary file not shown.
Binary file modified src/FMI2/callbackFunctions/binaries/win64/callbackFunctions.lib
Binary file not shown.

2 comments on commit debe082

@ThummeTo
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/109273

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v1.0.1 -m "<description of version>" debe082b9d778c7f7023326adc044d41c7f92668
git push origin v1.0.1

Please sign in to comment.