From 6e9911601d0c1518c4fa8ad55d91345d1d029c8f Mon Sep 17 00:00:00 2001 From: Lncvrt Date: Sun, 25 May 2025 14:10:50 -0700 Subject: [PATCH 1/4] Add a package workflow --- .github/workflows/package-build.yml | 65 +++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 .github/workflows/package-build.yml diff --git a/.github/workflows/package-build.yml b/.github/workflows/package-build.yml new file mode 100644 index 0000000..f29d25f --- /dev/null +++ b/.github/workflows/package-build.yml @@ -0,0 +1,65 @@ +name: Package Build + +on: + workflow_dispatch: + +jobs: + linux: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions-rust-lang/setup-rust-toolchain@v1 + with: + components: rustfmt + - run: sudo apt update && sudo apt install libasound2-dev pkg-config p7zip-full -y + - run: cargo build --release + - run: | + mkdir Geometry-Rays + cp ./target/release/geometry-rays-fyre ./Geometry-Rays + cp -r Resources mods save-data Geometry-Rays + 7z a -tzip Geometry-Rays-linux.zip Geometry-Rays + rm -rf Geometry-Rays + - uses: actions/upload-artifact@v4 + with: + name: Geometry-Rays-linux + path: Geometry-Rays-linux.zip + + windows: + runs-on: windows-latest + steps: + - uses: actions/checkout@v4 + - uses: actions-rust-lang/setup-rust-toolchain@v1 + with: + components: rustfmt + - run: cargo build --release + - run: | + mkdir Geometry-Rays + copy .\target\release\geometry-rays-fyre.exe .\Geometry-Rays\ + xcopy Resources Geometry-Rays\Resources /E /I + xcopy mods Geometry-Rays\mods /E /I + xcopy save-data Geometry-Rays\save-data /E /I + 7z a -tzip Geometry-Rays-windows.zip Geometry-Rays + rmdir /S /Q Geometry-Rays + - uses: actions/upload-artifact@v4 + with: + name: Geometry-Rays-windows + path: Geometry-Rays-windows.zip + + macos: + runs-on: macos-latest + steps: + - uses: actions/checkout@v4 + - uses: actions-rust-lang/setup-rust-toolchain@v1 + with: + components: rustfmt + - run: cargo build --release + - run: | + mkdir Geometry-Rays + cp ./target/release/geometry-rays-fyre ./Geometry-Rays + cp -r Resources mods save-data Geometry-Rays + 7z a -tzip Geometry-Rays-macos.zip Geometry-Rays + rm -rf Geometry-Rays + - uses: actions/upload-artifact@v4 + with: + name: Geometry-Rays-macos + path: Geometry-Rays-macos.zip From 1ef7a9b75c56d59da1046799b55549b777f6527c Mon Sep 17 00:00:00 2001 From: Lncvrt Date: Sun, 25 May 2025 14:17:35 -0700 Subject: [PATCH 2/4] Fix issues with powershell --- .github/workflows/package-build.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/package-build.yml b/.github/workflows/package-build.yml index f29d25f..ba789cb 100644 --- a/.github/workflows/package-build.yml +++ b/.github/workflows/package-build.yml @@ -34,12 +34,11 @@ jobs: - run: cargo build --release - run: | mkdir Geometry-Rays - copy .\target\release\geometry-rays-fyre.exe .\Geometry-Rays\ - xcopy Resources Geometry-Rays\Resources /E /I - xcopy mods Geometry-Rays\mods /E /I - xcopy save-data Geometry-Rays\save-data /E /I + Copy-Item .\target\release\geometry-rays-fyre.exe .\Geometry-Rays\ + Copy-Item -Recurse Resources,mods,'save-data' -Destination .\Geometry-Rays 7z a -tzip Geometry-Rays-windows.zip Geometry-Rays - rmdir /S /Q Geometry-Rays + Remove-Item -Recurse -Force Geometry-Rays + shell: pwsh - uses: actions/upload-artifact@v4 with: name: Geometry-Rays-windows From 8a6ec461adb95fac16020205ee6af904fd2869f6 Mon Sep 17 00:00:00 2001 From: Lncvrt Date: Sun, 25 May 2025 14:23:53 -0700 Subject: [PATCH 3/4] Fix double zipping --- .github/workflows/package-build.yml | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/.github/workflows/package-build.yml b/.github/workflows/package-build.yml index ba789cb..5903fa7 100644 --- a/.github/workflows/package-build.yml +++ b/.github/workflows/package-build.yml @@ -17,12 +17,10 @@ jobs: mkdir Geometry-Rays cp ./target/release/geometry-rays-fyre ./Geometry-Rays cp -r Resources mods save-data Geometry-Rays - 7z a -tzip Geometry-Rays-linux.zip Geometry-Rays - rm -rf Geometry-Rays - uses: actions/upload-artifact@v4 with: name: Geometry-Rays-linux - path: Geometry-Rays-linux.zip + path: Geometry-Rays windows: runs-on: windows-latest @@ -36,13 +34,11 @@ jobs: mkdir Geometry-Rays Copy-Item .\target\release\geometry-rays-fyre.exe .\Geometry-Rays\ Copy-Item -Recurse Resources,mods,'save-data' -Destination .\Geometry-Rays - 7z a -tzip Geometry-Rays-windows.zip Geometry-Rays - Remove-Item -Recurse -Force Geometry-Rays shell: pwsh - uses: actions/upload-artifact@v4 with: name: Geometry-Rays-windows - path: Geometry-Rays-windows.zip + path: Geometry-Rays macos: runs-on: macos-latest @@ -56,9 +52,7 @@ jobs: mkdir Geometry-Rays cp ./target/release/geometry-rays-fyre ./Geometry-Rays cp -r Resources mods save-data Geometry-Rays - 7z a -tzip Geometry-Rays-macos.zip Geometry-Rays - rm -rf Geometry-Rays - uses: actions/upload-artifact@v4 with: name: Geometry-Rays-macos - path: Geometry-Rays-macos.zip + path: Geometry-Rays \ No newline at end of file From 2384de6bef1f15509e684393c5bece7a802fb8d7 Mon Sep 17 00:00:00 2001 From: Lncvrt Date: Sun, 25 May 2025 14:44:56 -0700 Subject: [PATCH 4/4] Add intel + silicon support for mac --- .github/workflows/package-build.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/package-build.yml b/.github/workflows/package-build.yml index 5903fa7..38ace9d 100644 --- a/.github/workflows/package-build.yml +++ b/.github/workflows/package-build.yml @@ -47,10 +47,13 @@ jobs: - uses: actions-rust-lang/setup-rust-toolchain@v1 with: components: rustfmt - - run: cargo build --release + - run: rustup target add x86_64-apple-darwin + - run: cargo build --release --target x86_64-apple-darwin + - run: cargo build --release --target aarch64-apple-darwin - run: | mkdir Geometry-Rays - cp ./target/release/geometry-rays-fyre ./Geometry-Rays + cp ./target/x86_64-apple-darwin/release/geometry-rays-fyre ./Geometry-Rays/geometry-rays-intel + cp ./target/aarch64-apple-darwin/release/geometry-rays-fyre ./Geometry-Rays/geometry-rays-silicon cp -r Resources mods save-data Geometry-Rays - uses: actions/upload-artifact@v4 with: