2024-11-06 11:03:01 +00:00
|
|
|
name: Release Artifacts
|
2023-05-30 14:30:22 +00:00
|
|
|
|
|
|
|
on:
|
2024-11-06 11:03:01 +00:00
|
|
|
workflow_dispatch:
|
2023-05-30 14:30:22 +00:00
|
|
|
|
|
|
|
env:
|
|
|
|
CARGO_TERM_COLOR: always
|
|
|
|
RUST_BACKTRACE: "full"
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
ci:
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2024-11-06 10:38:59 +00:00
|
|
|
os: [macos-13, ubuntu-latest]
|
2023-05-30 14:30:22 +00:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2024-04-08 11:18:53 +00:00
|
|
|
uses: actions/checkout@v4
|
2023-05-30 14:30:22 +00:00
|
|
|
with:
|
|
|
|
submodules: recursive
|
|
|
|
|
|
|
|
- name: Cache
|
2024-04-08 11:18:53 +00:00
|
|
|
uses: actions/cache@v4
|
2023-05-30 14:30:22 +00:00
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
~/.cargo
|
|
|
|
target
|
2023-06-04 21:38:21 +00:00
|
|
|
key: ${{ matrix.os }}
|
2023-05-30 14:30:22 +00:00
|
|
|
|
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
|
|
|
if [ "$RUNNER_OS" == "Linux" ]; then
|
|
|
|
sudo apt update
|
2024-04-08 11:18:53 +00:00
|
|
|
sudo apt install -y libgtk-3-dev mingw-w64
|
|
|
|
rustup target install x86_64-pc-windows-gnu
|
2023-06-04 14:38:12 +00:00
|
|
|
elif [ "$RUNNER_OS" == "macOS" ]; then
|
|
|
|
cargo install cargo-bundle
|
|
|
|
rustup target install aarch64-apple-darwin
|
2024-12-09 16:52:37 +00:00
|
|
|
rustup target install x86_64-apple-darwin
|
2023-05-30 14:30:22 +00:00
|
|
|
fi
|
|
|
|
shell: bash
|
|
|
|
|
|
|
|
|
|
|
|
- name: Build
|
2023-06-04 14:38:12 +00:00
|
|
|
run: |
|
|
|
|
if [ "$RUNNER_OS" == "macOS" ]; then
|
2024-12-09 16:52:37 +00:00
|
|
|
cargo bundle --release --target x86_64-apple-darwin
|
2023-07-19 18:21:11 +00:00
|
|
|
cargo bundle --release --target aarch64-apple-darwin
|
2024-12-09 16:52:37 +00:00
|
|
|
mv target/x86_64-apple-darwin/release/bundle/osx/Gupaxx.app Gupaxx-macos-x64.app
|
2024-03-23 18:22:40 +00:00
|
|
|
mv target/aarch64-apple-darwin/release/bundle/osx/Gupaxx.app Gupaxx-macos-arm64.app
|
2024-12-09 16:52:37 +00:00
|
|
|
cargo bundle --release --target x86_64-apple-darwin --features=bundle
|
2024-04-21 12:59:04 +00:00
|
|
|
cargo bundle --release --target aarch64-apple-darwin --features=bundle
|
|
|
|
mv target/release/bundle/osx/Gupaxx.app Gupaxx-macos-x64.app_b
|
|
|
|
mv target/aarch64-apple-darwin/release/bundle/osx/Gupaxx.app Gupaxx-macos-arm64.app_b
|
2024-04-21 13:34:39 +00:00
|
|
|
tar -cf macos.tar Gupaxx-macos-arm64.app Gupaxx-macos-x64.app Gupaxx-macos-arm64.app_b Gupaxx-macos-x64.app_b
|
2023-06-04 21:38:21 +00:00
|
|
|
elif [ "$RUNNER_OS" == "Linux" ]; then
|
2023-07-19 18:21:11 +00:00
|
|
|
cargo build --release --target x86_64-unknown-linux-gnu
|
2024-03-23 18:22:40 +00:00
|
|
|
mv target/x86_64-unknown-linux-gnu/release/gupaxx .
|
2024-04-21 12:59:04 +00:00
|
|
|
cargo build --release --target x86_64-unknown-linux-gnu --features=bundle
|
|
|
|
mv target/x86_64-unknown-linux-gnu/release/gupaxx gupaxx_b
|
|
|
|
tar -cf linux.tar gupaxx gupaxx_b
|
2024-04-08 11:18:53 +00:00
|
|
|
cargo build --release --target x86_64-pc-windows-gnu
|
2024-04-21 12:59:04 +00:00
|
|
|
mv target/x86_64-pc-windows-gnu/release/gupaxx.exe .
|
|
|
|
cargo build --release --target x86_64-pc-windows-gnu --features=bundle
|
|
|
|
mv target/x86_64-pc-windows-gnu/release/gupaxx.exe gupaxx_b.exe
|
|
|
|
tar -cf windows.tar gupaxx.exe gupaxx_b.exe
|
2023-06-04 14:38:12 +00:00
|
|
|
fi
|
|
|
|
shell: bash
|
|
|
|
|
2023-06-04 21:38:21 +00:00
|
|
|
- name: Archive (Windows)
|
2024-04-08 11:18:53 +00:00
|
|
|
if: ${{ runner.os == 'Linux' }}
|
|
|
|
uses: actions/upload-artifact@v4
|
2023-06-04 14:38:12 +00:00
|
|
|
with:
|
2023-06-04 21:38:21 +00:00
|
|
|
name: windows
|
2024-04-21 12:59:04 +00:00
|
|
|
path: windows.tar
|
2023-06-04 21:37:31 +00:00
|
|
|
|
2023-07-15 15:51:15 +00:00
|
|
|
- name: Archive
|
2023-06-04 21:38:21 +00:00
|
|
|
if: ${{ runner.os == 'macOS' }}
|
2024-04-08 11:18:53 +00:00
|
|
|
uses: actions/upload-artifact@v4
|
2023-06-04 21:37:31 +00:00
|
|
|
with:
|
2023-07-15 15:51:15 +00:00
|
|
|
name: macos
|
|
|
|
path: macos.tar
|
2023-06-04 21:38:21 +00:00
|
|
|
|
|
|
|
- name: Archive (Linux)
|
|
|
|
if: ${{ runner.os == 'Linux' }}
|
2024-04-08 11:18:53 +00:00
|
|
|
uses: actions/upload-artifact@v4
|
2023-06-04 21:38:21 +00:00
|
|
|
with:
|
|
|
|
name: linux
|
2023-07-15 15:51:15 +00:00
|
|
|
path: linux.tar
|