-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 32ffaf0
Showing
39 changed files
with
174,282 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/target |
Oops, something went wrong.