From f6a8655069a8ef85f3a13b140ea460f7ccca5e6e Mon Sep 17 00:00:00 2001 From: justdesewa <126489338+justdesewa@users.noreply.github.com> Date: Wed, 18 Dec 2024 12:00:56 -0500 Subject: [PATCH] Update travis.yml --- .github/workflows/travis.yml | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/.github/workflows/travis.yml b/.github/workflows/travis.yml index 4f45ac7..dbea608 100644 --- a/.github/workflows/travis.yml +++ b/.github/workflows/travis.yml @@ -3,7 +3,7 @@ name: Build and Deploy on: push: tags: - - 'v*' # Ensure only tags trigger this workflow + - 'v*' # Ensure only tags trigger this workflow pull_request: branches: - main @@ -25,7 +25,6 @@ jobs: run: | sudo apt-get update sudo apt-get install -y software-properties-common - # Install compilers based on the matrix if [[ "${{ matrix.cc }}" == "gcc-12" ]]; then sudo apt-get install -y g++-12 export CC=gcc-12 @@ -35,7 +34,6 @@ jobs: export CC=clang-14 export CXX=clang++-14 fi - # Install additional dependencies sudo apt-get install -y cmake doxygen graphviz - name: Configure with CMake @@ -58,9 +56,7 @@ jobs: - name: Archive Artifacts run: | - # Create artifact directories mkdir -p artifacts/lib artifacts/include/sydevs/core artifacts/include/sydevs/systems artifacts/include/sydevs/time - # Copy headers if [[ -d src/sydevs/core ]]; then cp src/sydevs/core/*.h artifacts/include/sydevs/core || true fi @@ -70,33 +66,28 @@ jobs: if [[ -d src/sydevs/time ]]; then cp src/sydevs/time/*.h artifacts/include/sydevs/time || true fi - # Copy compiled libraries if [[ -d build ]]; then cp build/libSyDEVS* artifacts/lib || true fi - mkdir -p $(dirname "SyDEVS-${{ github.ref }}-${{ matrix.cc }}.zip") - # Create final archive - zip -r SyDEVS-${{ github.ref }}-${{ matrix.cc }}.zip artifacts + zip -r "SyDEVS-${{ github.ref_name }}-${{ matrix.cc }}.zip" artifacts - name: Package Documentation if: github.event_name == 'push' || github.ref == 'refs/tags/*' run: | if [ -d doc/html ]; then - zip -r SyDEVS-${{ github.ref }}_api-reference.zip doc/html + zip -r "SyDEVS-${{ github.ref_name }}_api-reference.zip" doc/html fi - # Step 3: Create GitHub Release for the Compiler - name: Create GitHub Release (Compiler-specific) uses: svenstaro/upload-release-action@v2 with: repo_token: ${{ secrets.GITHUB_TOKEN }} - file: SyDEVS-${{ github.ref }}-${{ matrix.cc }}.zip # Unique filename with version and compiler - asset_name: SyDEVS_Release_${{ github.ref }}-${{ matrix.cc }}.zip # Unique filename with version and compiler - tag: ${{ github.ref }} # Use tag name as version - overwrite: false # Prevent overwriting if asset already exists - body: "Release for SyDEVS version ${{ github.ref }} using compiler ${{ matrix.cc }}" + file: "SyDEVS-${{ github.ref_name }}-${{ matrix.cc }}.zip" + asset_name: "SyDEVS-${{ github.ref_name }}-${{ matrix.cc }}.zip" + tag: ${{ github.ref_name }} # Use cleaned tag name + overwrite: false + body: "Release for SyDEVS version ${{ github.ref_name }} using compiler ${{ matrix.cc }}" - # Step 4: Deploy Documentation - name: Deploy Documentation if: github.event_name == 'push' || github.ref == 'refs/tags/*' run: bash scripts/deploy_docs.sh