-
-
Notifications
You must be signed in to change notification settings - Fork 158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Cargo Packager support #18
Closed
naman-crabnebula
wants to merge
18
commits into
versotile-org:main
from
naman-crabnebula:Enable-Cargo-Packager-Build
Closed
Changes from 14 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
54d2c34
Add Cargo Packager support
naman-crabnebula 6413b7c
Update identifier
naman-crabnebula 04f9db1
Merge branch 'european-browser:main' into Enable-Cargo-Packager-Build
naman-crabnebula ee2ec4e
Fix the Verso Git url
naman-crabnebula 5de7051
Add packager feature
naman-crabnebula f360d8b
Init Deploy workflow
naman-crabnebula a0e0dcd
Update workflow
naman-crabnebula bb07d1d
Fix workflow
naman-crabnebula 8a2fe0f
Add hardcoded version
naman-crabnebula 52b989c
Add environment secret
naman-crabnebula a5c41d0
Hardcode app-slug for now
naman-crabnebula 7a8b410
Add verbose and out-dir
naman-crabnebula 3c9735b
Fix warnings
naman-crabnebula 0559f14
Fix windows worflow
naman-crabnebula 825d7e7
Add NO_STRIP as temporary measure
naman-crabnebula 0917448
Try Only deb for now
naman-crabnebula 0178daf
Only build app for cache
naman-crabnebula 7ff252c
Fix failing action
naman-crabnebula File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,157 @@ | ||
name: Continuous Deployment | ||
|
||
on: | ||
push: | ||
branches: | ||
- "*" | ||
schedule: | ||
- cron: "0 0 * * *" | ||
|
||
jobs: | ||
|
||
draft: | ||
runs-on: ubuntu-latest | ||
environment: "Init Workflow" | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: create draft release | ||
uses: crabnebula-dev/cloud-release@v0.1.0 | ||
with: | ||
command: release draft test-verso 0.0.1 --framework packager | ||
api-key: ${{ secrets.CN_API_KEY }} | ||
|
||
build-linux: | ||
name: Build [linux] | ||
needs: draft | ||
runs-on: ubuntu-latest # We may want this to be older for wider libc compatibility | ||
environment: "Init Workflow" | ||
steps: | ||
- name: Checkout the repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Rust stable | ||
uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
with: | ||
toolchain: stable | ||
cache: true | ||
|
||
- name: Set env | ||
run: echo "LIBCLANG_PATH=/usr/lib/llvm-14/lib" >> $GITHUB_ENV | ||
|
||
- name: Install dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt install build-essential python3-pip ccache clang cmake curl \ | ||
g++ git gperf libdbus-1-dev libfreetype6-dev libgl1-mesa-dri \ | ||
libgles2-mesa-dev libglib2.0-dev libgstreamer-plugins-base1.0-dev \ | ||
gstreamer1.0-plugins-good libgstreamer-plugins-good1.0-dev \ | ||
gstreamer1.0-plugins-bad libgstreamer-plugins-bad1.0-dev \ | ||
gstreamer1.0-plugins-ugly gstreamer1.0-plugins-base \ | ||
libgstreamer-plugins-base1.0-dev gstreamer1.0-libav \ | ||
libgstrtspserver-1.0-dev gstreamer1.0-tools libges-1.0-dev \ | ||
libharfbuzz-dev liblzma-dev libunwind-dev libunwind-dev libvulkan1 \ | ||
libx11-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev \ | ||
libxmu-dev libxmu6 libegl1-mesa-dev llvm-dev m4 xorg-dev | ||
|
||
- name: Install Cargo Packager | ||
run: cargo install cargo-packager --locked | ||
|
||
- name: Package the App | ||
run: cargo packager --release --verbose | ||
|
||
- name: Move assets to workdir | ||
run: | | ||
mv target/release/* . | ||
|
||
- name: upload assets | ||
uses: crabnebula-dev/cloud-release@v0.1.0 | ||
with: | ||
command: release upload test-verso 0.0.1 --framework packager | ||
api-key: ${{ secrets.CN_API_KEY }} | ||
|
||
|
||
build-windows: | ||
name: Build [windows] | ||
needs: draft | ||
runs-on: windows-latest | ||
environment: "Init Workflow" | ||
steps: | ||
- name: Checkout the repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Rust stable | ||
uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
with: | ||
toolchain: stable | ||
cache: true | ||
|
||
- name: Install scroop | ||
uses: MinoruSekine/setup-scoop@v3 | ||
|
||
- name: Install dependencies | ||
run: scoop install git python llvm cmake curl | ||
|
||
- name: Install Cargo Packager | ||
run: cargo install cargo-packager --locked | ||
|
||
- name: Package the App | ||
run: cargo packager --release --verbose | ||
|
||
- name: Move assets to workdir | ||
run: | | ||
mv target/release/* . | ||
|
||
- name: upload assets | ||
uses: crabnebula-dev/cloud-release@v0.1.0 | ||
with: | ||
command: release upload test-verso 0.0.1 --framework packager | ||
api-key: ${{ secrets.CN_API_KEY }} | ||
|
||
build-macos: | ||
name: Build [macos] | ||
needs: draft | ||
runs-on: macos-latest | ||
environment: "Init Workflow" | ||
steps: | ||
- name: Checkout the repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Rust stable | ||
uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
with: | ||
toolchain: stable | ||
cache: true | ||
|
||
- name: Install dependencies | ||
run: brew install cmake pkg-config | ||
|
||
- name: Install Cargo Packager | ||
run: cargo install cargo-packager --locked | ||
|
||
- name: Package the App | ||
run: cargo packager --release --verbose | ||
|
||
- name: Move assets to workdir | ||
run: | | ||
mv target/release/* . | ||
|
||
- name: upload assets | ||
uses: crabnebula-dev/cloud-release@v0.1.0 | ||
with: | ||
command: release upload test-verso 0.0.1 --framework packager | ||
api-key: ${{ secrets.CN_API_KEY }} | ||
|
||
publish: | ||
needs: [build-linux, build-windows, build-macos] | ||
|
||
runs-on: ubuntu-latest | ||
environment: "Init Workflow" | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: publish release | ||
uses: crabnebula-dev/cloud-release@v0.1.0 | ||
with: | ||
command: release publish test-verso 0.0.1 --framework packager | ||
api-key: ${{ secrets.CN_API_KEY }} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -8,7 +8,7 @@ edition = "2021" | |
license = "Apache-2.0 OR MIT" | ||
description = "A web browser" | ||
readme = "README.md" | ||
repository = "https://github.com/wusyong/verso" | ||
repository = "https://github.com/european-browser/verso" | ||
documentation = "https://docs.rs/verso" | ||
categories = ["Web programming"] | ||
|
||
|
@@ -19,9 +19,26 @@ targets = [ | |
"x86_64-apple-darwin", | ||
] | ||
|
||
[package.metadata.packager] | ||
name = "verso" | ||
product-name = "verso" | ||
identifier = "com.eu-browser.verso" | ||
version = "0.0.1" | ||
before-each-package-command = "cargo build --release --features packager" | ||
out-dir = "target/release" | ||
resources = [ | ||
"resources", | ||
"demo.html" | ||
] | ||
icons=[ | ||
"resources/icons/icon256x256.png", | ||
"resources/icons/icon.ico" | ||
wusyong marked this conversation as resolved.
Show resolved
Hide resolved
|
||
] | ||
|
||
[features] | ||
default = [] | ||
|
||
# Exclusively for cargo packager command. | ||
packager = ["dep:cargo-packager-resource-resolver"] | ||
|
||
[build-dependencies] | ||
cfg_aliases = "0.1" | ||
|
@@ -37,6 +54,8 @@ crossbeam-channel = "0.5" | |
getopts = "0.2.17" | ||
surfman = { version = "0.9", features = ["chains", "sm-angle", "sm-angle-default", "sm-x11", "sm-raw-window-handle"] } | ||
winit = { version = "0.29", features = ["rwh_05"] } | ||
# Cargo Packager | ||
cargo-packager-resource-resolver = { version = "0.1", features = ["auto-detect-format"], optional = true } | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I updated a commit that can embed all resource files into binary. I believe we don't need to handle file path then. |
||
|
||
[target."cfg(any(target_os = \"ios\", target_os = \"macos\"))".dependencies] | ||
block = "0.1" | ||
|
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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
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
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
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.