Rename package; Update workflow
Workflow taken from
This commit is contained in:
parent
ca230f6a9b
commit
1654529dc0
4 changed files with 133 additions and 110 deletions
196
.github/workflows/release.yaml
vendored
196
.github/workflows/release.yaml
vendored
|
@ -1,17 +1,51 @@
|
||||||
---
|
name: Release
|
||||||
name: pre-release
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
tags:
|
||||||
- "main"
|
- "v*"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
compile:
|
compile:
|
||||||
name: "Compilation"
|
name: Build release binaries
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [windows-2022, ubuntu-22.04, macos-12]
|
include:
|
||||||
features: ["logging,globe_view", "globe_view", "logging,render", "render", "logging", ""]
|
- target: x86_64-apple-darwin
|
||||||
|
os: macos-latest
|
||||||
|
features: globe_view
|
||||||
|
- target: aarch64-apple-darwin
|
||||||
|
os: macos-latest
|
||||||
|
features: globe_view
|
||||||
|
- target: x86_64-pc-windows-msvc
|
||||||
|
os: windows-latest
|
||||||
|
features: globe_view
|
||||||
|
- target: x86_64-unknown-linux-gnu
|
||||||
|
os: ubuntu-latest
|
||||||
|
features: globe_view
|
||||||
|
- target: x86_64-apple-darwin
|
||||||
|
os: macos-latest
|
||||||
|
features: render
|
||||||
|
- target: aarch64-apple-darwin
|
||||||
|
os: macos-latest
|
||||||
|
features: render
|
||||||
|
- target: x86_64-pc-windows-msvc
|
||||||
|
os: windows-latest
|
||||||
|
features: render
|
||||||
|
- target: x86_64-unknown-linux-gnu
|
||||||
|
os: ubuntu-latest
|
||||||
|
features: render
|
||||||
|
- target: x86_64-apple-darwin
|
||||||
|
os: macos-latest
|
||||||
|
features: ""
|
||||||
|
- target: aarch64-apple-darwin
|
||||||
|
os: macos-latest
|
||||||
|
features: ""
|
||||||
|
- target: x86_64-pc-windows-msvc
|
||||||
|
os: windows-latest
|
||||||
|
features: ""
|
||||||
|
- target: x86_64-unknown-linux-gnu
|
||||||
|
os: ubuntu-latest
|
||||||
|
features: ""
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
|
@ -22,103 +56,87 @@ jobs:
|
||||||
profile: minimal
|
profile: minimal
|
||||||
toolchain: nightly
|
toolchain: nightly
|
||||||
override: true
|
override: true
|
||||||
|
target: ${{ matrix.target }}
|
||||||
|
|
||||||
- name: Install linux dependencies
|
- name: Install linux dependencies
|
||||||
if: ${{ matrix.os == 'ubuntu-22.04' }}
|
if: matrix.os == 'ubuntu-latest'
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get install -y libwayland-dev libxkbcommon-dev
|
sudo apt-get install -y libwayland-client0 libwayland-dev libxkbcommon-dev
|
||||||
|
|
||||||
- name: Build binary
|
- run: cargo build --release --locked --target ${{ matrix.target }} --no-default-features --features=${{ matrix.features }}
|
||||||
run: |
|
|
||||||
cargo build --release --no-default-features --features=${{ matrix.features }}
|
|
||||||
|
|
||||||
- name: Upload logging & globe_view binary (Unix)
|
- name: Post-Build | Compress [Features; -nix]
|
||||||
uses: actions/upload-artifact@v3
|
if: matrix.features != '' && !contains(matrix.os, 'windows')
|
||||||
if: ${{ matrix.os != 'windows-2022' && matrix.features == 'logging,globe_view' }}
|
uses: a7ul/tar-action@v1.1.0
|
||||||
with:
|
with:
|
||||||
name: worlds-rs-${{ matrix.os }}-logging-globe_view
|
command: c
|
||||||
path: |
|
cwd: ./target/${{ matrix.target }}/release/
|
||||||
target/release/worlds-sim-rust
|
files: worlds-history-sim-rs
|
||||||
- name: Upload logging & render binary (Unix)
|
outPath: worlds-history-sim-rs-${{ matrix.target }}-${{ matrix.features }}.tar.gz
|
||||||
uses: actions/upload-artifact@v3
|
- name: Post-Build | Compress [Minimal; -nix]
|
||||||
if: ${{ matrix.os != 'windows-2022' && matrix.features == 'logging,render' }}
|
if: matrix.features == '' && !contains(matrix.os, 'windows')
|
||||||
|
uses: a7ul/tar-action@v1.1.0
|
||||||
with:
|
with:
|
||||||
name: worlds-rs-${{ matrix.os }}-logging-render
|
command: c
|
||||||
path: |
|
cwd: ./target/${{ matrix.target }}/release/
|
||||||
target/release/worlds-sim-rust
|
files: worlds-history-sim-rs
|
||||||
- name: Upload non-logging binary (Unix)
|
outPath: worlds-history-sim-rs-${{ matrix.target }}-minimal.tar.gz
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
if: ${{ matrix.os != 'windows-2022' && !contains(matrix.features, ',') && matrix.features != '' }}
|
|
||||||
with:
|
|
||||||
name: worlds-rs-${{ matrix.os }}-${{ matrix.features }}
|
|
||||||
path: |
|
|
||||||
target/release/worlds-sim-rust
|
|
||||||
- name: Upload basic binary (Unix)
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
if: ${{ matrix.os != 'windows-2022' && matrix.features == '' }}
|
|
||||||
with:
|
|
||||||
name: worlds-rs-${{ matrix.os }}-minimal
|
|
||||||
path: |
|
|
||||||
target/release/worlds-sim-rust
|
|
||||||
|
|
||||||
- name: Upload logging & globe_view binary (Windows)
|
- name: Post-Build | Compress [Features; Windows]
|
||||||
uses: actions/upload-artifact@v3
|
if: matrix.features != '' && contains(matrix.os, 'windows')
|
||||||
if: ${{ matrix.os == 'windows-2022' && matrix.features == 'logging,globe_view' }}
|
uses: a7ul/tar-action@v1.1.0
|
||||||
with:
|
with:
|
||||||
name: worlds-rs-${{ matrix.os }}-logging-globe_view
|
command: c
|
||||||
path: |
|
cwd: ./target/${{ matrix.target }}/release/
|
||||||
target/release/worlds-sim-rust.exe
|
files: worlds-history-sim-rs.exe
|
||||||
- name: Upload logging & render binary (Windows)
|
outPath: worlds-history-sim-rs-${{ matrix.target }}-${{ matrix.features }}.tar.gz
|
||||||
uses: actions/upload-artifact@v3
|
- name: Post-Build | Compress [Minimal; Windows]
|
||||||
if: ${{ matrix.os == 'windows-2022' && matrix.features == 'logging,render' }}
|
if: matrix.features == '' && contains(matrix.os, 'windows')
|
||||||
|
uses: a7ul/tar-action@v1.1.0
|
||||||
with:
|
with:
|
||||||
name: worlds-rs-${{ matrix.os }}-logging-render
|
command: c
|
||||||
path: |
|
cwd: ./target/${{ matrix.target }}/release/
|
||||||
target/release/worlds-sim-rust.exe
|
files: worlds-history-sim-rs.exe
|
||||||
- name: Upload non-logging binary (Windows)
|
outPath: worlds-history-sim-rs-${{ matrix.target }}-minimal.tar.gz
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
if: ${{ matrix.os == 'windows-2022' && !contains(matrix.features, ',') && matrix.features != '' }}
|
|
||||||
with:
|
|
||||||
name: worlds-rs-${{ matrix.os }}-${{ matrix.features }}
|
|
||||||
path: |
|
|
||||||
target/release/worlds-sim-rust.exe
|
|
||||||
- name: Upload basic binary (Windows)
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
if: ${{ matrix.os == 'windows-2022' && matrix.features == '' }}
|
|
||||||
with:
|
|
||||||
name: worlds-rs-${{ matrix.os }}-minimal
|
|
||||||
path: |
|
|
||||||
target/release/worlds-sim-rust.exe
|
|
||||||
|
|
||||||
create-release:
|
- name: Deploy | Upload Artifacts [Features]
|
||||||
name: "Create release"
|
if: matrix.features != ''
|
||||||
runs-on: ubuntu-22.04
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
if-no-files-found: error
|
||||||
|
name: worlds-history-sim-rs-${{ matrix.target }}-${{ matrix.features }}
|
||||||
|
path: worlds-history-sim-rs-${{ matrix.target }}-${{ matrix.features }}.tar.gz
|
||||||
|
|
||||||
|
- name: Deploy | Upload Artifacts [Minimal]
|
||||||
|
if: matrix.features == ''
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
if-no-files-found: error
|
||||||
|
name: worlds-history-sim-rs-${{ matrix.target }}-minimal
|
||||||
|
path: worlds-history-sim-rs-${{ matrix.target }}-minimal.tar.gz
|
||||||
|
|
||||||
|
github-release:
|
||||||
|
name: GitHub release
|
||||||
|
runs-on: ubuntu-latest
|
||||||
needs: [compile]
|
needs: [compile]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/download-artifact@v3
|
- name: Setup | Checkout
|
||||||
with:
|
uses: actions/checkout@v3
|
||||||
path: /tmp/downloads/
|
|
||||||
|
|
||||||
- name: Create packaged files
|
- name: Setup | Artifacts
|
||||||
run: |
|
uses: actions/download-artifact@v3
|
||||||
cd /tmp/downloads/
|
|
||||||
for dir in */; do
|
|
||||||
echo "creating $(pwd)/${dir%/}.zip"
|
|
||||||
( cd "$dir" && zip -9 -r ../"${dir%/}".zip . )
|
|
||||||
echo "created $(pwd)/${dir%/}.zip"
|
|
||||||
file "$(pwd)/${dir%/}.zip"
|
|
||||||
done
|
|
||||||
cd -
|
|
||||||
|
|
||||||
- name: List all artifact files
|
- name: Setup | Checksums
|
||||||
run: ls -la --color=auto /tmp/downloads/*.zip
|
run: for file in worlds-history-sim-rs-**/*; do openssl dgst -sha256 -r "$file" | awk '{print $1}' > "${file}.sha256"; done
|
||||||
|
|
||||||
- uses: actions/checkout@v3
|
- run: ls **/*
|
||||||
- name: Upload binaries
|
|
||||||
|
- name: Publish
|
||||||
uses: marvinpinto/action-automatic-releases@v1.2.1
|
uses: marvinpinto/action-automatic-releases@v1.2.1
|
||||||
with:
|
with:
|
||||||
repo_token: "${{ secrets.GITHUB_TOKEN }}"
|
repo_token: "${{ secrets.GITHUB_TOKEN }}"
|
||||||
title: "Latest build"
|
prerelease: ${{ contains(github.ref_name, 'pre') }}
|
||||||
prerelease: true
|
|
||||||
files: |
|
files: |
|
||||||
/tmp/downloads/*.zip
|
**/*.sha256
|
||||||
automatic_release_tag: latest
|
**/*.tar.gz
|
||||||
|
LICENSE
|
||||||
|
|
39
Cargo.lock
generated
39
Cargo.lock
generated
|
@ -1001,12 +1001,11 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "crossbeam-utils"
|
name = "crossbeam-utils"
|
||||||
version = "0.8.11"
|
version = "0.8.12"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "51887d4adc7b564537b15adcfb307936f8075dfcd5f00dde9a9f1d29383682bc"
|
checksum = "edbafec5fa1f196ca66527c1b12c2ec4745ca14b50f1ad8f9f6f720b55d11fac"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cfg-if 1.0.0",
|
"cfg-if 1.0.0",
|
||||||
"once_cell",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -1419,9 +1418,9 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "image"
|
name = "image"
|
||||||
version = "0.24.3"
|
version = "0.24.4"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "7e30ca2ecf7666107ff827a8e481de6a132a9b687ed3bb20bb1c144a36c00964"
|
checksum = "bd8e4fb07cf672b1642304e731ef8a6a4c7891d67bb4fd4f5ce58cd6ed86803c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bytemuck",
|
"bytemuck",
|
||||||
"byteorder",
|
"byteorder",
|
||||||
|
@ -1504,9 +1503,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "libc"
|
name = "libc"
|
||||||
version = "0.2.133"
|
version = "0.2.134"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "c0f80d65747a3e43d1596c7c5492d95d5edddaabd45a7fcdb02b95f644164966"
|
checksum = "329c933548736bc49fd575ee68c89e8be4d260064184389a5b77517cddd99ffb"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "libloading"
|
name = "libloading"
|
||||||
|
@ -1937,9 +1936,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "proc-macro2"
|
name = "proc-macro2"
|
||||||
version = "1.0.43"
|
version = "1.0.46"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "0a2ca2c61bc9f3d74d2886294ab7b9853abd9c1ad903a3ac7815c58989bb7bab"
|
checksum = "94e2ef8dbfc347b10c094890f778ee2e36ca9bb4262e86dc99cd217e35f3470b"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"unicode-ident",
|
"unicode-ident",
|
||||||
]
|
]
|
||||||
|
@ -2094,18 +2093,18 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "serde"
|
name = "serde"
|
||||||
version = "1.0.144"
|
version = "1.0.145"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "0f747710de3dcd43b88c9168773254e809d8ddbdf9653b84e2554ab219f17860"
|
checksum = "728eb6351430bccb993660dfffc5a72f91ccc1295abaa8ce19b27ebe4f75568b"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"serde_derive",
|
"serde_derive",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "serde_derive"
|
name = "serde_derive"
|
||||||
version = "1.0.144"
|
version = "1.0.145"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "94ed3a816fb1d101812f83e789f888322c34e291f894f19590dc310963e87a00"
|
checksum = "81fa1584d3d1bcacd84c277a0dfe21f5b0f6accf4a23d04d4c6d61f1af522b4c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
|
@ -2202,9 +2201,9 @@ checksum = "8fb1df15f412ee2e9dfc1c504260fa695c1c3f10fe9f4a6ee2d2184d7d6450e2"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "syn"
|
name = "syn"
|
||||||
version = "1.0.100"
|
version = "1.0.101"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "52205623b1b0f064a4e71182c3b18ae902267282930c6d5462c91b859668426e"
|
checksum = "e90cde112c4b9690b8cbe810cba9ddd8bc1d7472e2cae317b69e9438c1cba7d2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
|
@ -2235,18 +2234,18 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "thiserror"
|
name = "thiserror"
|
||||||
version = "1.0.35"
|
version = "1.0.37"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "c53f98874615aea268107765aa1ed8f6116782501d18e53d08b471733bea6c85"
|
checksum = "10deb33631e3c9018b9baf9dcbbc4f737320d2b576bac10f6aefa048fa407e3e"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"thiserror-impl",
|
"thiserror-impl",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "thiserror-impl"
|
name = "thiserror-impl"
|
||||||
version = "1.0.35"
|
version = "1.0.37"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "f8b463991b4eab2d801e724172285ec4195c650e8ec79b149e6c2a8e6dd3f783"
|
checksum = "982d17546b47146b28f7c22e3d08465f6b8903d0ea13c1660d9d84a6e7adcdbb"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
|
@ -2758,7 +2757,7 @@ dependencies = [
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "worlds-sim-rust"
|
name = "worlds-history-sim-rs"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bevy",
|
"bevy",
|
||||||
|
|
|
@ -1,9 +1,12 @@
|
||||||
[package]
|
[package]
|
||||||
name = "worlds-sim-rust"
|
name = "worlds-history-sim-rs"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
resolver = "2"
|
resolver = "2"
|
||||||
|
|
||||||
|
[profile]
|
||||||
|
release = { strip = "symbols", lto = "thin", opt-level = "z" }
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
logging = ["planet/logging"]
|
logging = ["planet/logging"]
|
||||||
globe_view = ["planet/globe_view", "render"]
|
globe_view = ["planet/globe_view", "render"]
|
||||||
|
|
|
@ -3,6 +3,9 @@ name = "planet"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
|
[profile]
|
||||||
|
release = { strip = "symbols", lto = "thin", opt-level = "z" }
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
logging = []
|
logging = []
|
||||||
globe_view = ["render"]
|
globe_view = ["render"]
|
||||||
|
|
Loading…
Reference in a new issue