-
Notifications
You must be signed in to change notification settings - Fork 12
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 #17 from Autodesk/update_ci
Simplify continuous integration scripts
- Loading branch information
Showing
5 changed files
with
73 additions
and
212 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,70 @@ | ||
name: Build and Deploy SyDEVS | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
pull_request: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
matrix: | ||
os: [windows-latest, ubuntu-latest] | ||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
# Step 1: Checkout repository | ||
- name: Checkout Repository | ||
uses: actions/checkout@v3 | ||
|
||
# Step 2: Setup build tools based on OS | ||
- name: Setup Build Tools on Windows | ||
if: runner.os == 'Windows' | ||
run: choco install visualstudio2022buildtools --yes | ||
shell: powershell | ||
- name: Install Dependencies (Ubuntu) | ||
if: runner.os == 'Linux' | ||
run: sudo apt-get update && sudo apt-get install -y build-essential cmake | ||
|
||
# Step 3: Configure build environment | ||
- name: Configure Build | ||
run: cmake -S . -B build | ||
shell: bash | ||
|
||
# Step 4: Build project | ||
- name: Build Project | ||
run: cmake --build build --config Release --parallel | ||
shell: bash | ||
|
||
deploy: | ||
runs-on: ubuntu-latest | ||
needs: build | ||
if: startsWith(github.ref, 'refs/tags/') | ||
|
||
steps: | ||
# Step 1: Checkout repository | ||
- name: Checkout Repository | ||
uses: actions/checkout@v3 | ||
|
||
# Step 2: Prepare release package | ||
- name: Prepare Artifacts | ||
run: | | ||
sudo apt-get install -y doxygen | ||
(cat doxygen.config; echo "PROJECT_NUMBER=${{ github.ref_name }}") | doxygen - | ||
zip -r SyDEVS-${{ github.ref_name }}.zip doc src CMakeLists.txt CODE_OF_CONDUCT.md CONTRIBUTING.md doxygen.config LICENSE.md README.md | ||
shell: bash | ||
|
||
# Step 3: Deploy release package | ||
- name: Create GitHub Release | ||
uses: svenstaro/upload-release-action@v2 | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
file: SyDEVS-${{ github.ref_name }}.zip | ||
asset_name: SyDEVS-${{ github.ref_name }}.zip | ||
tag: ${{ github.ref_name }} | ||
overwrite: false | ||
body: "Release Package for SyDEVS ${{ github.ref_name }}" |
This file was deleted.
Oops, something went wrong.
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