Skip to content

Commit

Permalink
Merge pull request #17 from Autodesk/update_ci
Browse files Browse the repository at this point in the history
Simplify continuous integration scripts
  • Loading branch information
rhysgoldstein authored Dec 19, 2024
2 parents d40392a + 521a31a commit 9429e46
Show file tree
Hide file tree
Showing 5 changed files with 73 additions and 212 deletions.
115 changes: 0 additions & 115 deletions .github/workflows/appVeyor.yml

This file was deleted.

70 changes: 70 additions & 0 deletions .github/workflows/ci.yml
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 }}"
93 changes: 0 additions & 93 deletions .github/workflows/travis.yml

This file was deleted.

5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,9 @@ You should update the documentation on a regular basis to keep it in sync with t

When releasing a new version of SyDEVS, remember to perform the following steps:

1. In [doxygen.config](doxygen.config), update the `PROJECT_NUMBER`.
1. Ensure the change above is merged into the `main` branch of the repo.
1. Create the new release.
1. Generate the API documentation, and copy the contents of `doc/html`.
1. Wait for the package `SyDEVS-[version].zip` to appear as a release asset.
1. Unzip the package and copy the contents of `doc/html`.
1. Checkout the `gh-pages` branch of the repo.
1. In the `gh-pages` branch, replace the contents of `doc/html` with the contents copied above.

Expand Down
2 changes: 1 addition & 1 deletion doxygen.config
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ PROJECT_NAME = SyDEVS
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = v0.7 (under development)
PROJECT_NUMBER =

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand Down

0 comments on commit 9429e46

Please sign in to comment.