Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
balintkissdev committed Sep 9, 2024
0 parents commit 32ffaf0
Show file tree
Hide file tree
Showing 39 changed files with 174,282 additions and 0 deletions.
75 changes: 75 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: Build

on:
push:
pull_request:

env:
CARGO_TERM_COLOR: always

jobs:
windows-build:
runs-on: windows-latest
strategy:
matrix:
toolchain:
- stable
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Rust toolchain
run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
- name: Build project
run: cargo build --verbose
- name: Package release
if: startsWith(github.ref, 'refs/tags/')
run: |
$VERSION = $env:GITHUB_REF -replace 'refs/tags/', ''
$ARCHIVE_NAME = "3d-renderer-rust-$VERSION-win64"
cargo build --release --verbose
mkdir "$ARCHIVE_NAME"
Copy-Item LICENSE -Destination "$ARCHIVE_NAME"
Copy-Item README.md -Destination "$ARCHIVE_NAME"
Copy-Item assets -Destination "$ARCHIVE_NAME" -Recurse
Copy-Item doc -Destination "$ARCHIVE_NAME" -Recurse
Copy-Item target/release/3d-renderer-rust.exe -Destination "$ARCHIVE_NAME"
Compress-Archive -Path "$ARCHIVE_NAME" -DestinationPath "$ARCHIVE_NAME.zip"
- name: Publish release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v2
with:
files: |
3d-renderer-rust-*.zip
linux-build:
runs-on: ubuntu-latest
strategy:
matrix:
toolchain:
- stable
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install extra-cmake-modules libglfw3-dev wayland-protocols libxkbcommon-dev xorg-dev
- name: Setup Rust toolchain
run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
- name: Build project
run: cargo build --verbose
- name: Package release
if: startsWith(github.ref, 'refs/tags/')
run: |
VERSION=$(echo ${{ github.ref }} | sed 's/refs\/tags\///')
ARCHIVE_NAME=3d-renderer-rust-$VERSION-linux-x86_64
cargo build --release --verbose
mkdir "$ARCHIVE_NAME"
cp -R assets doc LICENSE target/release/3d-renderer-rust README.md "$ARCHIVE_NAME/"
tar -czvf "$ARCHIVE_NAME.tar.gz" "$ARCHIVE_NAME"
- name: Publish release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v2
with:
files: |
3d-renderer-rust-*.tar.gz
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/target
Loading

0 comments on commit 32ffaf0

Please sign in to comment.