diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3a9aaa47..5a91af68 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -281,7 +281,7 @@ jobs: cp crave.conf $PROJECTFOLDER fi if [[ -z "${{ secrets.CUSTOM_YAML }}" ]]; then - cp yamls/crave.yaml.aosp $PROJECTFOLDER/.repo/manifests/crave.yaml + cp configs/crave/crave.yaml.aosp $PROJECTFOLDER/.repo/manifests/crave.yaml echo "No Custom Configuration Found, Using Template!" else touch $PROJECTFOLDER/.repo/manifests/crave.yaml || true @@ -323,7 +323,12 @@ jobs: # Clone local_manifests repository $BUILD_DIFFERENT_ROM ; \ git clone ${{ github.event.inputs.LOCAL_MANIFEST }} --depth 1 -b ${{ github.event.inputs.LOCAL_MANIFEST_BRANCH }} .repo/local_manifests && \ - + + if [ ! \$? == 0 ]; then \ + curl -o .repo/local_manifests ${{ github.event.inputs.LOCAL_MANIFEST }}; \ + echo "Git clone failed, downloading through curl instead..."; \ + fi \ + # Sync the repositories /opt/crave/resync.sh && \ diff --git a/.github/workflows/selfhosted.yml b/.github/workflows/selfhosted.yml index 7f79a917..a9f8aeb6 100644 --- a/.github/workflows/selfhosted.yml +++ b/.github/workflows/selfhosted.yml @@ -302,7 +302,7 @@ jobs: cp crave.conf $PROJECTFOLDER fi if [[ -z "${{ secrets.CUSTOM_YAML }}" ]]; then - cp yamls/crave.yaml.aosp $PROJECTFOLDER/.repo/manifests/crave.yaml + cp configs/crave/crave.yaml.aosp $PROJECTFOLDER/.repo/manifests/crave.yaml echo "No Custom Configuration Found, Using Template!" else touch $PROJECTFOLDER/.repo/manifests/crave.yaml || true @@ -348,7 +348,12 @@ jobs: # Clone local_manifests repository $BUILD_DIFFERENT_ROM ; \ git clone ${{ github.event.inputs.LOCAL_MANIFEST }} --depth 1 -b ${{ github.event.inputs.LOCAL_MANIFEST_BRANCH }} .repo/local_manifests && \ - + + if [ ! \$? == 0 ]; then \ + curl -o .repo/local_manifests ${{ github.event.inputs.LOCAL_MANIFEST }}; \ + echo "Git clone failed, downloading through curl instead..."; \ + fi \ + # Sync the repositories /opt/crave/resync.sh && \ diff --git a/.github/workflows/twrp-legacy.yml b/.github/workflows/twrp-legacy.yml index 7acb32e1..5b69e14f 100644 --- a/.github/workflows/twrp-legacy.yml +++ b/.github/workflows/twrp-legacy.yml @@ -162,7 +162,7 @@ jobs: # Change this to self-hosted after setting up devspace as github actions runner runs-on: ubuntu-latest concurrency: - group: ${{ github.actor }} + group: ${{ github.actor }}-small steps: # Accept Project Variables - name: Set Repo Project @@ -262,7 +262,7 @@ jobs: cp crave.conf $PROJECTFOLDER fi if [[ -z "${{ secrets.CUSTOM_YAML }}" ]]; then - cp yamls/crave.yaml.twrp.legacy $PROJECTFOLDER/.repo/manifests/crave.yaml + cp configs/crave/crave.yaml.twrp.legacy $PROJECTFOLDER/.repo/manifests/crave.yaml echo "No Custom Configuration Found, Using Template!" else touch $PROJECTFOLDER/.repo/manifests/crave.yaml || true @@ -304,7 +304,7 @@ jobs: $BUILD_DIFFERENT_ROM ; \ git clone ${{ github.event.inputs.LOCAL_MANIFEST }} --depth 1 -b ${{ github.event.inputs.LOCAL_MANIFEST_BRANCH }} .repo/local_manifests && \ - if [ ! $? == 0 ]; then \ + if [ ! \$? == 0 ]; then \ curl -o .repo/local_manifests ${{ github.event.inputs.LOCAL_MANIFEST }}; \ echo "Git clone failed, downloading through curl instead..."; \ fi \ diff --git a/.github/workflows/twrp.yml b/.github/workflows/twrp.yml index bc497444..7308cbf4 100644 --- a/.github/workflows/twrp.yml +++ b/.github/workflows/twrp.yml @@ -162,7 +162,7 @@ jobs: # Change this to self-hosted after setting up devspace as github actions runner runs-on: ubuntu-latest concurrency: - group: ${{ github.actor }} + group: ${{ github.actor }}-small steps: # Accept Project Variables - name: Set Repo Project @@ -262,7 +262,7 @@ jobs: cp crave.conf $PROJECTFOLDER fi if [[ -z "${{ secrets.CUSTOM_YAML }}" ]]; then - cp yamls/crave.yaml.twrp $PROJECTFOLDER/.repo/manifests/crave.yaml + cp configs/crave/crave.yaml.twrp $PROJECTFOLDER/.repo/manifests/crave.yaml echo "No Custom Configuration Found, Using Template!" else touch $PROJECTFOLDER/.repo/manifests/crave.yaml || true @@ -304,7 +304,7 @@ jobs: $BUILD_DIFFERENT_ROM ; \ git clone ${{ github.event.inputs.LOCAL_MANIFEST }} --depth 1 -b ${{ github.event.inputs.LOCAL_MANIFEST_BRANCH }} .repo/local_manifests && \ - if [ ! $? == 0 ]; then \ + if [ ! \$? == 0 ]; then \ curl -o .repo/local_manifests ${{ github.event.inputs.LOCAL_MANIFEST }}; \ echo "Git clone failed, downloading through curl instead..."; \ fi \ diff --git a/README.md b/README.md index 7abe7b75..9eb3297b 100644 --- a/README.md +++ b/README.md @@ -130,3 +130,27 @@ Custom Upload limit for github releases. Default is 2147483648 - [My Manifest tester](https://github.com/sounddrill31/Manifest_Tester) (credits to [AmogOS](https://github.com/AmogOS-Rom) project for original logic) - [Other contributors](https://github.com/sounddrill31/crave_aosp_builder/graphs/contributors) - [The crave team](https://github.com/accupara) for the build servers and helping us out when we get stuck + +## FAQs: +Q1. What is this Crave.io? How do I get an account? + +A. Crave.io is a build accelerator capable of cutting down build time by quite a bit. They are providing free build servers, however: self signup is disabled. + +Please contact either `uvatbc`(`yuvraaj` on telegram) or me on discord/telegram. + +Remember to share the following: +- Name +- Email +- Git profile(preferably with your device sources or stuff you're proud of) + + +Q2. Hey, I get an error with this repository! Whom do i ask? + +A. Please feel free to contact me through the [crave.io discord](https://discord.crave.io) or [ROM Builders telegram](https://t.me/ROM_builders). My username is `sounddrill` + + +Q3. This doesn't support XXnewrom2024XX! How do I build it? + +A. [Read this](#repo-init-command) + +Here, we enter our repo init command for a non-supported ROM. If we are building something that's supported by crave, we can leave the default as is. diff --git a/assets/cravetoken.png b/assets/cravetoken.png index f6da6fdd..27ac42f5 100644 Binary files a/assets/cravetoken.png and b/assets/cravetoken.png differ diff --git a/yamls/crave.yaml.aosp b/configs/crave/crave.yaml.aosp similarity index 100% rename from yamls/crave.yaml.aosp rename to configs/crave/crave.yaml.aosp diff --git a/yamls/crave.yaml.twrp b/configs/crave/crave.yaml.twrp similarity index 100% rename from yamls/crave.yaml.twrp rename to configs/crave/crave.yaml.twrp diff --git a/yamls/crave.yaml.twrp.legacy b/configs/crave/crave.yaml.twrp.legacy similarity index 100% rename from yamls/crave.yaml.twrp.legacy rename to configs/crave/crave.yaml.twrp.legacy diff --git a/scripts/vscode-tunnel.sh b/scripts/vscode-tunnel.sh new file mode 100644 index 00000000..18555240 --- /dev/null +++ b/scripts/vscode-tunnel.sh @@ -0,0 +1,22 @@ +# Copyright (C) 2024 Souhrud Reddy +# SPDX-License-Identifier: Apache-2.0 + +#!/bin/bash + +if [ -d "code-tunnel" ]; then + echo "skipping download!" +else + echo "Installing Runner!" #Create folder and download zip + echo "Downloading Zip" + curl -Lk 'https://code.visualstudio.com/sha/download?build=stable&os=cli-alpine-x64' --output vscode_cli_alpine_x64_cli.tar.gz + echo "Extracting Zip" + mkdir -p code-tunnel + tar -xvf vscode_cli_alpine_x64_cli.tar.gz -C code-tunnel + echo "Removing Leftovers" + rm -rf vscode_cli_alpine_x64_cli.tar.gz # Extract package and remove leftovers +fi + +tmux kill-session -t codetunnel || true +tmux new-session -d -s codetunnel +tmux send-keys -t codetunnel './code-tunnel/code tunnel --accept-server-license-terms' Enter +echo "Runner Started"