-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #343 from mtconnect/main-dev
- Loading branch information
Showing
234 changed files
with
6,029 additions
and
56,167 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,8 +20,6 @@ ChangeLog | |
# conanfile.py # need this | ||
Dockerfile | ||
Glossary*.pdf | ||
LICENSE.TXT | ||
README.md | ||
terms.tex | ||
|
||
*.log | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,191 @@ | ||
# Build, Test, and Draft Releae for static and dynamic versions of the | ||
# MTConnect Agent on Windows, Mac OS, and Linux. | ||
# | ||
# The Windows x86 and x86_64 builds create ZIP packages and attach them to | ||
# a draft release when the commit is tagged. | ||
# | ||
# Secret required for Release: | ||
# RELEASE_GITHUB_TOKEN - Release token created by admin in Settings / Developer Settings / Personal access tokens / | ||
# Find-grained tokens | ||
# The token must be renewed every 90 days. | ||
|
||
name: Build MTConnect C++ Agent | ||
|
||
on: | ||
# Enable automated build once verified | ||
pull_request: | ||
paths-ignore: ["**/*.md", "LICENSE.txt", ".gitignore"] | ||
branches: [ "main", "main-dev" ] | ||
|
||
push: | ||
paths-ignore: ["**/*.md", "LICENSE.txt", ".gitignore"] | ||
branches: [ "main", "main-dev" ] | ||
tags: | ||
- "v*.*.*" | ||
|
||
# Allow manually run workflows | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build_windows: | ||
runs-on: windows-2019 | ||
name: "Windows 2019 Arch: ${{ matrix.arch }}, Shared: ${{ matrix.shared }}" | ||
strategy: | ||
matrix: | ||
arch: ["x86", "amd64"] | ||
shared: ["True", "False"] | ||
include: | ||
- arch: "x86" | ||
profile: "vs32" | ||
- arch: "amd64" | ||
profile: "vs64" | ||
- shared: "True" | ||
profile: "vs64shared" | ||
exclude: | ||
- arch: "x86" | ||
shared: "True" | ||
|
||
steps: | ||
- name: Setup conan and zip directories | ||
run: | | ||
ruby -e @" | ||
base = ENV['GITHUB_WORKSPACE'].gsub('\\', '/'). | ||
gsub(/\/[a-zA-Z]+$/, '') | ||
puts %{ZIP_DIR=#{base}} | ||
puts %{CONAN_HOME=#{base}/conan2} | ||
"@ >> $env:GITHUB_ENV | ||
echo "CTEST_OUTPUT_ON_FAILURE=TRUE" >> $env:GITHUB_ENV | ||
- name: Print Directories | ||
run: | | ||
echo $CONAN_HOME | ||
echo $ZIP_DIR | ||
echo $CTEST_OUTPUT_ON_FAILURE | ||
- name: Checkout Agent | ||
uses: actions/checkout@v3 | ||
|
||
- name: Cache conan packages | ||
id: cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: ${{ env.CONAN_HOME }} | ||
key: ${{ runner.os }}-build-${{ matrix.profile }}-${{ hashFiles('**/conanfile.py') }} | ||
|
||
- name: Install Conan | ||
uses: turtlebrowser/[email protected] | ||
|
||
- name: Initialize VS Dev Env | ||
uses: seanmiddleditch/gha-setup-vsdevenv@master | ||
with: | ||
arch: ${{ matrix.arch }} | ||
host_arch: ${{ matrix.arch }} | ||
|
||
- name: Setup Conan | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
run: | | ||
conan profile detect -f | ||
- name: Cleanup Prior Build | ||
if: steps.cache.outputs.cache-hit == 'true' | ||
continue-on-error: true | ||
run: | | ||
conan remove mtconnect_agent -c | ||
- name: Build and Test C++ Agent | ||
run: | | ||
set CTEST_OUTPUT_ON_FAILURE=TRUE | ||
conan create . --build=missing -pr conan/profiles/${{ matrix.profile }} -o with_docs=False -o cpack=True -o cpack_destination=${{ env.ZIP_DIR }} -o shared=${{ matrix.shared }} | ||
- name: Release | ||
uses: softprops/action-gh-release@v1 | ||
if: ${{ startsWith(github.ref, 'refs/tags/') && matrix.shared == 'False' }} | ||
with: | ||
name: Version ${{ github.ref_name }} | ||
draft: true | ||
files: | | ||
${{ env.ZIP_DIR }}/agent*.zip | ||
token: ${{ secrets.RELEASE_GITHUB_TOKEN }} | ||
|
||
build_linux: | ||
runs-on: ubuntu-latest | ||
name: "Ubuntu Latest, Shared: ${{ matrix.shared }}" | ||
strategy: | ||
matrix: | ||
shared: ["True", "False"] | ||
|
||
steps: | ||
- name: Install dependencies | ||
shell: bash | ||
run: | | ||
sudo apt install -y build-essential cmake gcc-11 g++-11 python3 autoconf automake | ||
- name: Checkout Agent | ||
uses: actions/checkout@v3 | ||
|
||
- name: Cache conan packages | ||
id: cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.conan2 | ||
key: ${{ runner.os }}-build-${{ matrix.shared }}-${{ hashFiles('**/conanfile.py') }} | ||
|
||
- name: Install Conan | ||
uses: turtlebrowser/[email protected] | ||
|
||
- name: Setup Conan | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
run: | | ||
conan profile detect -f | ||
- name: Cleanup Prior Build | ||
if: steps.cache.outputs.cache-hit == 'true' | ||
continue-on-error: true | ||
run: | | ||
conan remove mtconnect_agent -c | ||
- name: Build and Test C++ Agent | ||
shell: bash | ||
run: | | ||
export CTEST_OUTPUT_ON_FAILURE=TRUE | ||
conan create . --build=missing -pr conan/profiles/gcc -o shared=${{ matrix.shared }} -o with_docs=False | ||
build_macos: | ||
runs-on: macos-latest | ||
name: "MacOS Latest, Shared: ${{ matrix.shared }}" | ||
strategy: | ||
matrix: | ||
shared: ["True", "False"] | ||
|
||
steps: | ||
- name: Checkout Agent | ||
uses: actions/checkout@v3 | ||
|
||
- name: Cache conan packages | ||
id: cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.conan2 | ||
key: ${{ runner.os }}-build-${{ matrix.shared }}-${{ hashFiles('**/conanfile.py') }} | ||
|
||
- name: Install Conan | ||
uses: turtlebrowser/[email protected] | ||
|
||
- name: Setup Conan | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
run: | | ||
conan profile detect -f | ||
- name: Cleanup Prior Build | ||
if: steps.cache.outputs.cache-hit == 'true' | ||
continue-on-error: true | ||
run: | | ||
conan remove mtconnect_agent -c | ||
- name: Build and Test C++ Agent | ||
shell: bash | ||
run: | | ||
export CTEST_OUTPUT_ON_FAILURE=TRUE | ||
conan create . --build=missing -pr conan/profiles/macos -o shared=${{ matrix.shared }} -o with_docs=False | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.