2022-09-19 13:41:33 +02:00
|
|
|
---
|
|
|
|
name: pre-release
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- "main"
|
|
|
|
|
|
|
|
jobs:
|
2022-09-19 15:05:39 +02:00
|
|
|
compile:
|
|
|
|
name: "Compilation"
|
2022-09-19 13:41:33 +02:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
os: [windows-2022, ubuntu-22.04, macos-12]
|
2022-09-20 15:14:16 +02:00
|
|
|
features: ["debug,render", "render", "debug,globe_view", "globe_view", "debug", ""]
|
2022-09-19 13:41:33 +02:00
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Install rust toolchain
|
|
|
|
uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
profile: minimal
|
|
|
|
toolchain: nightly
|
|
|
|
override: true
|
|
|
|
|
|
|
|
- name: Build binary
|
|
|
|
run: |
|
|
|
|
cargo build --release --no-default-features --features=${{ matrix.features }}
|
2022-09-19 14:33:40 +02:00
|
|
|
|
2022-09-20 12:25:31 +02:00
|
|
|
- name: Upload debug & render binary
|
2022-09-19 14:33:40 +02:00
|
|
|
uses: actions/upload-artifact@v3
|
2022-09-19 15:05:39 +02:00
|
|
|
if: ${{ matrix.features == 'debug,render' }}
|
2022-09-19 14:33:40 +02:00
|
|
|
with:
|
2022-09-19 15:05:39 +02:00
|
|
|
name: worlds-rs-${{ matrix.os }}-debug-render
|
|
|
|
path: target/release/worlds-sim-rust*
|
|
|
|
|
2022-09-20 15:14:16 +02:00
|
|
|
- name: Upload debug & globe_view binary
|
2022-09-19 15:05:39 +02:00
|
|
|
uses: actions/upload-artifact@v3
|
2022-09-20 15:14:16 +02:00
|
|
|
if: ${{ matrix.features == 'debug,globe_view' }}
|
2022-09-20 12:25:31 +02:00
|
|
|
with:
|
2022-09-20 15:14:16 +02:00
|
|
|
name: worlds-rs-${{ matrix.os }}-debug-globe_view
|
2022-09-20 12:25:31 +02:00
|
|
|
path: target/release/worlds-sim-rust*
|
|
|
|
|
|
|
|
- name: Upload non-debug binary
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
if: ${{ !contains(matrix.features, ',') && matrix.features != '' }}
|
2022-09-19 15:05:39 +02:00
|
|
|
with:
|
|
|
|
name: worlds-rs-${{ matrix.os }}-${{ matrix.features }}
|
|
|
|
path: target/release/worlds-sim-rust*
|
|
|
|
|
|
|
|
- name: Upload basic binary
|
2022-09-19 14:33:40 +02:00
|
|
|
uses: actions/upload-artifact@v3
|
2022-09-19 15:05:39 +02:00
|
|
|
if: ${{ matrix.features == '' }}
|
|
|
|
with:
|
|
|
|
name: worlds-rs-${{ matrix.os }}-none
|
|
|
|
path: target/release/worlds-sim-rust*
|
|
|
|
|
2022-09-19 15:17:40 +02:00
|
|
|
# create-release:
|
|
|
|
# name: "Create release"
|
|
|
|
# runs-on: ubuntu-22.04
|
|
|
|
# if: ${{ startsWith(github.ref, 'refs/tags/') }}
|
|
|
|
# needs: [compile]
|
|
|
|
# steps:
|
|
|
|
# - uses: actions/download-artifact@v3
|
|
|
|
# with:
|
|
|
|
# name: worlds-rs-windows-2022-full
|
|
|
|
# path: ~/download/worlds-rs-windows-2022-full.zip
|
|
|
|
# - uses: actions/download-artifact@v3
|
|
|
|
# with:
|
|
|
|
# name: worlds-rs-windows-2022-debug
|
|
|
|
# path: ~/download/worlds-rs-windows-2022-debug.zip
|
|
|
|
# - uses: actions/download-artifact@v3
|
|
|
|
# with:
|
|
|
|
# name: worlds-rs-windows-2022-render
|
|
|
|
# path: ~/download/worlds-rs-windows-2022-render.zip
|
|
|
|
# - uses: actions/download-artifact@v3
|
|
|
|
# with:
|
|
|
|
# name: worlds-rs-windows-2022-none
|
|
|
|
# path: ~/download/worlds-rs-windows-2022-none.zip
|
2022-09-19 15:05:39 +02:00
|
|
|
|
2022-09-19 15:17:40 +02:00
|
|
|
# - uses: actions/download-artifact@v3
|
|
|
|
# with:
|
|
|
|
# name: worlds-rs-ubuntu-22.04-full
|
|
|
|
# path: ~/download/worlds-rs-ubuntu-22.04-full.zip
|
|
|
|
# - uses: actions/download-artifact@v3
|
|
|
|
# with:
|
|
|
|
# name: worlds-rs-ubuntu-22.04-debug
|
|
|
|
# path: ~/download/worlds-rs-ubuntu-22.04-debug.zip
|
|
|
|
# - uses: actions/download-artifact@v3
|
|
|
|
# with:
|
|
|
|
# name: worlds-rs-ubuntu-22.04-render
|
|
|
|
# path: ~/download/worlds-rs-ubuntu-22.04-render.zip
|
|
|
|
# - uses: actions/download-artifact@v3
|
|
|
|
# with:
|
|
|
|
# name: worlds-rs-ubuntu-22.04-none
|
|
|
|
# path: ~/download/worlds-rs-ubuntu-22.04-none.zip
|
2022-09-19 15:05:39 +02:00
|
|
|
|
2022-09-19 15:17:40 +02:00
|
|
|
# - uses: actions/download-artifact@v3
|
|
|
|
# with:
|
|
|
|
# name: worlds-rs-macos-12-full
|
|
|
|
# path: ~/download/worlds-rs-macos-12-full.zip
|
|
|
|
# - uses: actions/download-artifact@v3
|
|
|
|
# with:
|
|
|
|
# name: worlds-rs-macos-12-debug
|
|
|
|
# path: ~/download/worlds-rs-macos-12-debug.zip
|
|
|
|
# - uses: actions/download-artifact@v3
|
|
|
|
# with:
|
|
|
|
# name: worlds-rs-macos-12-render
|
|
|
|
# path: ~/download/worlds-rs-macos-12-render.zip
|
|
|
|
# - uses: actions/download-artifact@v3
|
|
|
|
# with:
|
|
|
|
# name: worlds-rs-macos-12-none
|
|
|
|
# path: ~/download/worlds-rs-macos-12-none.zip
|
2022-09-19 15:05:39 +02:00
|
|
|
|
2022-09-19 15:17:40 +02:00
|
|
|
# - name: Upload binaries
|
|
|
|
# uses: softprops/action-gh-release@v1
|
|
|
|
# with:
|
|
|
|
# files: ~/download/*
|