Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Bevy 2D Template
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Microhacks
Bevy 2D Template
Commits
844a3f6e
Verified
Commit
844a3f6e
authored
2 years ago
by
Louis
Browse files
Options
Downloads
Patches
Plain Diff
Add gitlab build; deploy pages, build all on trunk
parent
ba48bfe0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+75
-0
75 additions, 0 deletions
.gitlab-ci.yml
with
75 additions
and
0 deletions
.gitlab-ci.yml
0 → 100644
+
75
−
0
View file @
844a3f6e
image
:
"
r.lcr.gr/microhacks/bevy-builder:latest"
variables
:
BINARY_NAME
:
game
.cache_directive
:
&cache_directive
before_script
:
-
export CARGO_HOME="${CI_PROJECT_DIR}/.cargo"
-
export PATH="${CI_PROJECT_DIR}/.cargo/bin:$PATH"
cache
:
key
:
build-cache-key
paths
:
-
.cargo/registry/cache
-
.cargo/registry/index
-
.cargo/git/db
-
.cargo/bin/
-
target/
stages
:
-
build
-
package
build-windows
:
stage
:
build
<<
:
*cache_directive
script
:
-
cargo build --release -p game_core --target x86_64-pc-windows-gnu
only
:
-
trunk
build-linux
:
stage
:
build
<<
:
*cache_directive
script
:
-
cargo build --release -p game_core --target x86_64-unknown-linux-gnu
only
:
-
trunk
build-web
:
stage
:
build
<<
:
*cache_directive
script
:
-
cargo build --release -p game_core --target x86_64-unknown-linux-gnu
only
:
-
trunk
package-all
:
stage
:
package
<<
:
*cache_directive
script
:
-
mkdir -p dist/
-
cp -r assets dist/assets
-
cp target/x86_64-unknown-linux-gnu/release/game_core "dist/$BINARY_NAME"
-
cp target/x86_64-pc-windows-gnu/release/game_core.exe "dist/$BINARY_NAME.exe"
-
cd "${CI_PROJECT_DIR}/dist && zip -r "windows.zip" "./${BINARY_NAME}.exe" ./assets
-
cd "${CI_PROJECT_DIR}/dist && zip -r "linux.zip" "./${BINARY_NAME}" ./assets
-
cd "${CI_PROJECT_DIR}/game_core/dist && zip -r "../../dist/web.zip" "./*"
artifacts
:
paths
:
-
dist/web.zip
-
dist/windows.zip
-
dist/linux.zip
only
:
-
trunk
pages
:
stage
:
package
script
:
-
mkdir -p public/
-
cp -r game_core/dist/* public/
artifacts
:
paths
:
-
public
only
:
-
trunk
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment