From 057f3d46ccc9659c8a21a5c3631ca8cf2068ec61 Mon Sep 17 00:00:00 2001 From: Xavier Mitault Date: Sat, 30 Sep 2023 12:48:01 +0200 Subject: [PATCH 1/3] CICD: Fix build release --- scripts/bundle-linux.sh | 4 +++- scripts/bundle-macos.sh | 2 ++ scripts/bundle-windows.ps1 | 8 ++++---- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/scripts/bundle-linux.sh b/scripts/bundle-linux.sh index 60d1ec25..26f06479 100755 --- a/scripts/bundle-linux.sh +++ b/scripts/bundle-linux.sh @@ -3,6 +3,8 @@ set -ex +rm -rf build + cmake -S . -B build -DCMAKE_BUILD_TYPE=Release cmake --build build @@ -15,4 +17,4 @@ mv R-Type-Linux.sh ../r-type-linux.sh cpack --config CPackSourceConfig.cmake -G TGZ -mv R-Type-Source.tar.gz ../r-type-linux.tar.gz +mv R-Type-Linux.tar.gz ../r-type-linux.tar.gz diff --git a/scripts/bundle-macos.sh b/scripts/bundle-macos.sh index 11ef05d6..eca2a0c7 100755 --- a/scripts/bundle-macos.sh +++ b/scripts/bundle-macos.sh @@ -3,6 +3,8 @@ set -ex +rm -rf build + cmake -S . -B build -DCMAKE_BUILD_TYPE=Release cmake --build build diff --git a/scripts/bundle-windows.ps1 b/scripts/bundle-windows.ps1 index 4f764a40..bcdb8e1f 100644 --- a/scripts/bundle-windows.ps1 +++ b/scripts/bundle-windows.ps1 @@ -3,11 +3,11 @@ $ErrorActionPreference = "SilentlyContinue" -./scripts/compil.ps1 +rm -Recurse build cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_CONFIGURATION_TYPES="Release" -cmake --build build +cmake --build build --config Release cd build @@ -17,10 +17,10 @@ if ($LASTEXITCODE -ne 0) { type _CPack_Packages/win64/NSIS/NSISOutput.log } -Copy-Item R-Type-win64.exe ../r-type-windows.exe +Copy-Item R-Type-Windows.exe ../r-type-windows.exe cpack --config CPackSourceConfig.cmake -G ZIP -Copy-Item R-Type-Source.zip ../r-type-windows.zip +Copy-Item R-Type-Windows.zip ../r-type-windows.zip cd .. From f2cd9b38bbe8c0bcaa1a95f536a778bef67db8f5 Mon Sep 17 00:00:00 2001 From: Xavier Mitault Date: Sat, 30 Sep 2023 13:17:39 +0200 Subject: [PATCH 2/3] CICD: Fix macos release and compil for windows PATCH --- .github/workflows/release.yml | 22 ++++++++++------------ scripts/bundle-macos.sh | 4 +++- scripts/compil.ps1 | 11 ++--------- 3 files changed, 15 insertions(+), 22 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 887198de..12f6a2ce 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -54,9 +54,6 @@ jobs: - name: Build run: ./scripts/bundle-windows.ps1 - - name: LIST ALL - run: Get-ChildItem build -Recurse - - name: Upload To Release if: github.ref == 'refs/heads/main' env: @@ -93,9 +90,6 @@ jobs: - name: Build run: ./scripts/bundle-linux.sh - - name: LIST ALL - run: ls -Rl build - - name: Upload To Release if: github.ref == 'refs/heads/main' env: @@ -132,23 +126,27 @@ jobs: - name: Build run: ./scripts/bundle-macos.sh - - name: LIST ALL - run: ls -Rl build - - name: Upload To Release if: github.ref == 'refs/heads/main' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | gh release upload ${{ needs.release-create.outputs.release }} ./r-type-macos.zip - # gh release upload ${{ needs.release-create.outputs.release }} ./r-type-linux.sh + gh release upload ${{ needs.release-create.outputs.release }} ./r-type-macos.dmg + + - name: Upload To Artifact + if: github.ref != 'refs/heads/main' + uses: actions/upload-artifact@v3 + with: + name: r-type-macos.dmg + path: ./r-type-macos.dmg - name: Upload To Artifact if: github.ref != 'refs/heads/main' uses: actions/upload-artifact@v3 with: - name: r-type-macos.sh - path: ./r-type-macos.sh + name: r-type-macos.zip + path: ./r-type-macos.zip raylib-to-tar: runs-on: ubuntu-latest diff --git a/scripts/bundle-macos.sh b/scripts/bundle-macos.sh index eca2a0c7..58792505 100755 --- a/scripts/bundle-macos.sh +++ b/scripts/bundle-macos.sh @@ -13,6 +13,8 @@ cd build || exit 14 cpack --config CPackConfig.cmake -G DragNDrop || (cat "./_CPack_Packages/Darwin/DragNDrop/PreinstallOutput.log" && exit 1) +cp R-Type-Darwin.dmg ../r-type-macos.dmg + cpack --config CPackSourceConfig.cmake -G ZIP -ls -l +cp R-Type-Darwin.zip ../r-type-macos.zip diff --git a/scripts/compil.ps1 b/scripts/compil.ps1 index 9c410ce7..ef539cf0 100644 --- a/scripts/compil.ps1 +++ b/scripts/compil.ps1 @@ -3,13 +3,6 @@ $ErrorActionPreference = 'Stop' -cmake -S . -B build -DCMAKE_EXPORT_COMPILE_COMMANDS=ON +cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -cmake --build build - -$file = "build/_deps/raylib-build/raylib/Release/raylib.lib" - -if (-not(Test-Path -Path $file -PathType Leaf)) { - New-Item -Name "build/_deps/raylib-build/raylib/Release" -Type Directory -Force - Copy-Item "build/_deps/raylib-build/raylib/Debug/raylib.lib" $file -} +cmake --build build -- /m From bb6a978848c9733c6a2dff2bc016ac5c78ac5c09 Mon Sep 17 00:00:00 2001 From: Xavier Mitault Date: Sat, 30 Sep 2023 16:34:50 +0200 Subject: [PATCH 3/3] DOCUMENTATION: Add status badge --- docs/README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/README.md b/docs/README.md index 50be7b39..9c9c1a5b 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,5 +1,8 @@ # R-Bus +[![Release](https://github.com/X-R-G-B/R-Bus/actions/workflows/release.yml/badge.svg?branch=main)](https://github.com/X-R-G-B/R-Bus/actions/workflows/release.yml) + +[![Compil](https://github.com/X-R-G-B/R-Bus/actions/workflows/compil.yml/badge.svg?branch=main)](https://github.com/X-R-G-B/R-Bus/actions/workflows/compil.yml) ``` R-Type[a] is a horizontally scrolling shooter arcade video game developed