kitgit

tirbofish/dropbear · commit

222638c8f6bc0ec5e16548963b1c268edfc31ddf

dont break 2

Unverified

tk <4tkbytes@pm.me> · 2025-07-29 03:31

view full diff

diff --git a/.github/workflows/create_executable.yaml b/.github/workflows/create_executable.yaml
index b388da4..0682cd3 100644
--- a/.github/workflows/create_executable.yaml
+++ b/.github/workflows/create_executable.yaml
@@ -1,3 +1,4 @@
+
 name: Build Executables
 
 on:
@@ -6,53 +7,29 @@ on:
 
 jobs:
   build:
-    name: Build ${{ matrix.package }} for ${{ matrix.os_name }}
+    name: Build for ${{ matrix.os_name }}
     runs-on: ${{ matrix.os }}
     strategy:
       matrix:
         include:
           - os: windows-latest
-            os_name: Windows x64
+            os_name: windows-x64
             target: x86_64-pc-windows-msvc
             ext: .exe
-            assimp_url: https://github.com/jkvargas/russimp-sys/releases/download/v2.0.3/russimp-2.0.3-x86_64-pc-windows-msvc-dylib.tar.gz
-            assimp_file: assimp.dll
-            package: redback
-          - os: windows-latest
-            os_name: Windows x64
-            target: x86_64-pc-windows-msvc
-            ext: .exe
-            assimp_url: https://github.com/jkvargas/russimp-sys/releases/download/v2.0.3/russimp-2.0.3-x86_64-pc-windows-msvc-dylib.tar.gz
-            assimp_file: assimp.dll
-            package: eucalyptus
+            russimp_url: https://github.com/jkvargas/russimp-sys/releases/download/v2.0.3/russimp-2.0.3-x86_64-pc-windows-msvc-dylib.tar.gz
+            russimp_file: assimp.dll
           - os: ubuntu-latest
-            os_name: Linux x64
+            os_name: linux-x64
             target: x86_64-unknown-linux-gnu
             ext: ""
-            assimp_url: https://github.com/jkvargas/russimp-sys/releases/download/v2.0.3/russimp-2.0.3-x86_64-unknown-linux-gnu-dylib.tar.gz
-            assimp_file: libassimp.so.5
-            package: redback
-          - os: ubuntu-latest
-            os_name: Linux x64
-            target: x86_64-unknown-linux-gnu
-            ext: ""
-            assimp_url: https://github.com/jkvargas/russimp-sys/releases/download/v2.0.3/russimp-2.0.3-x86_64-unknown-linux-gnu-dylib.tar.gz
-            assimp_file: libassimp.so.5
-            package: eucalyptus
+            russimp_url: https://github.com/jkvargas/russimp-sys/releases/download/v2.0.3/russimp-2.0.3-x86_64-unknown-linux-gnu-dylib.tar.gz
+            russimp_file: libassimp.so.5
           - os: macos-latest
-            os_name: macOS ARM64
+            os_name: macos-arm64
             target: aarch64-apple-darwin
             ext: ""
-            assimp_url: "" # doesnt exist prompt user to build it themself
-            assimp_file: ""
-            package: redback
-          - os: macos-latest
-            os_name: macOS ARM64
-            target: aarch64-apple-darwin
-            ext: ""
-            assimp_url: "" # doesnt exist prompt user to build it themself
-            assimp_file: ""
-            package: eucalyptus
+            russimp_url: https://github.com/jkvargas/russimp-sys/releases/download/v2.0.3/russimp-2.0.3-x86_64-apple-darwin-dylib.tar.gz
+            russimp_file: libassimp.5.dylib
 
     steps:
       - uses: actions/checkout@v4
@@ -62,24 +39,25 @@ jobs:
         with:
           targets: ${{ matrix.target }}
 
-      - name: Build ${{ matrix.package }}
-        run: cargo build --release --package ${{ matrix.package }} --target ${{ matrix.target }}
+      - name: Build redback
+        run: cargo build --release --package redback --target ${{ matrix.target }}
+
+      - name: Build eucalyptus
+        run: cargo build --release --package eucalyptus --target ${{ matrix.target }}
 
-      - name: Download and extract assimp
-        if: ${{ matrix.assimp_url != '' }}
+      - name: Download and extract russimp dynamic lib
         run: |
-          curl --fail -L -o assimp.tar.gz ${{ matrix.assimp_url }}
-          if [ -f assimp.tar.gz ]; then
-            tar -xzf assimp.tar.gz
-          fi
+          curl -L -o russimp.tar.gz ${{ matrix.russimp_url }}
+          tar -xzf russimp.tar.gz
+        if: ${{ matrix.russimp_url != '' }}
 
       - name: Prepare artifact
         run: |
           mkdir dist
-          cp target/${{ matrix.target }}/release/${{ matrix.package }}${{ matrix.ext }} dist/
-          if [ "${{ matrix.assimp_file }}" != "" ]; then
-            # Find and copy the assimp file from extracted folder
-            find . -name "${{ matrix.assimp_file }}" -exec cp {} dist/ \;
+          cp target/${{ matrix.target }}/release/redback${{ matrix.ext }} dist/
+          cp target/${{ matrix.target }}/release/eucalyptus${{ matrix.ext }} dist/
+          if [ "${{ matrix.russimp_file }}" != "" ]; then
+            find . -name "${{ matrix.russimp_file }}" -exec cp {} dist/ \;
           fi
         shell: bash
 
@@ -87,32 +65,16 @@ jobs:
         run: |
           set -e
           if [ "${{ matrix.os }}" = "windows-latest" ]; then
-            powershell Compress-Archive -Path dist\* -DestinationPath ${{ matrix.package }}-${{ matrix.os_name }}.zip
+            powershell Compress-Archive -Path dist\* -DestinationPath executables-${{ matrix.os_name }}.zip
           else
-            tar -czf ${{ matrix.package }}-${{ matrix.os_name }}.tar.gz -C dist .
+            tar -czf executables-${{ matrix.os_name }}.tar.gz -C dist .
           fi
         shell: bash
 
       - name: Upload artifact
-        run: |
-          set -e
-          if [ -f "${{ matrix.package }}-${{ matrix.os_name }}.zip" ]; then
-            echo "Uploading zip artifact"
-            gh release upload temp-release "${{ matrix.package }}-${{ matrix.os_name }}.zip" || true
-            mv "${{ matrix.package }}-${{ matrix.os_name }}.zip" upload-artifact.zip
-            echo "::set-output name=artifact_path::upload-artifact.zip"
-          elif [ -f "${{ matrix.package }}-${{ matrix.os_name }}.tar.gz" ]; then
-            echo "Uploading tar.gz artifact"
-            gh release upload temp-release "${{ matrix.package }}-${{ matrix.os_name }}.tar.gz" || true
-            mv "${{ matrix.package }}-${{ matrix.os_name }}.tar.gz" upload-artifact.tar.gz
-            echo "::set-output name=artifact_path::upload-artifact.tar.gz"
-          else
-            echo "No artifact found to upload!"
-            exit 1
-          fi
-        shell: bash
-      - name: Upload artifact to Actions
         uses: actions/upload-artifact@v4
         with:
-          name: ${{ matrix.package }}-${{ matrix.os_name }}
-          path: upload-artifact.*
\ No newline at end of file
+          name: executables-${{ matrix.os_name }}
+          path: |
+            executables-${{ matrix.os_name }}.zip
+            executables-${{ matrix.os_name }}.tar.gz
\ No newline at end of file