-
-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(ci): use self-hosted runner (#92)
* aw shit, here we go again * blindly testing * ugh * ugh x2 * ugh x3 * could scream * :) * haha * ??? * HAHAHAHAHA * stinky * smellz * 😠 * hmmm * oops * y no werk :sad: * testing arm * testing arm oops * tweaks * tweaks * fix conditions * test cache * try fix cache * try fix cache again * test cache again * test just core change * try ignore * pause on caching ig 😭 * add cancelling? * hrm * ugh, figure something else out for cancelling... * push up yesterdays stuff oops * ugh * ugh * just for now * sigh * HUH? * maybe? * wrapping this up * wrapping this up x2
- Loading branch information
1 parent
87fc414
commit 0e79aec
Showing
31 changed files
with
607 additions
and
195 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
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,37 @@ | ||
name: 'Build Stump desktop app' | ||
description: 'Compile the Stump desktop app' | ||
|
||
inputs: | ||
platform: | ||
description: 'The plaform of the runner' | ||
required: true | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Checkout project | ||
uses: actions/checkout@v3 | ||
|
||
# - name: Configure environment | ||
# run: | | ||
# if [[ ${{ inputs.platform }} == 'linux' || ${{ inputs.platform }} == 'windows' ]]; then | ||
# echo "RUN_SETUP=false" >> $GITHUB_ENV | ||
# else | ||
# echo "RUN_SETUP=true" >> $GITHUB_ENV | ||
# fi | ||
|
||
- name: Setup rust | ||
uses: ./.github/actions/setup-cargo | ||
|
||
- name: Generate Prisma client | ||
uses: ./.github/actions/setup-prisma | ||
|
||
- name: Copy bundled web app | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: webapp | ||
path: ./apps/desktop/dist | ||
|
||
- name: Compile desktop app | ||
shell: bash | ||
run: cargo build --package stump_desktop --release |
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,97 @@ | ||
name: 'Build docker image' | ||
description: 'Build and load or push a tagged docker image for stump' | ||
|
||
inputs: | ||
username: | ||
description: 'Username for docker login' | ||
required: true | ||
password: | ||
description: 'Token for docker login' | ||
required: true | ||
load: | ||
description: 'Set output-type to docker' | ||
default: true | ||
push: | ||
description: 'Set output-type to registry' | ||
default: false | ||
tags: | ||
description: 'List of tags to assigned to the image' | ||
default: 'nightly' | ||
platforms: | ||
description: 'List of platforms to build' | ||
required: true | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Get commit short sha | ||
run: echo "GIT_REV=$(git rev-parse --short "$GITHUB_SHA")" >> $GITHUB_ENV | ||
shell: bash | ||
|
||
- name: Format tags | ||
run: | | ||
echo "TAGS=$(echo ${{ inputs.tags }} | sed -e 's/,/,aaronleopold\/stump:/g' | sed -e 's/^/aaronleopold\/stump:/')" >> $GITHUB_ENV | ||
shell: bash | ||
|
||
- name: Setup rust | ||
uses: ./.github/actions/setup-cargo | ||
|
||
- name: Generate Prisma client | ||
uses: ./.github/actions/setup-prisma | ||
|
||
# TODO: uncomment once cache stuff is resolved... | ||
# - name: Setup Docker layers cache | ||
# uses: actions/cache@v3 | ||
# with: | ||
# path: /tmp/.buildx-cache | ||
# key: ${{ runner.os }}-buildx-${{ github.sha }} | ||
# restore-keys: | | ||
# ${{ runner.os }}-buildx- | ||
|
||
# We only need QEMU when an arm* platform is targeted | ||
- name: Check QEMU requirement | ||
id: check-qemu | ||
run: | | ||
if [[ ${{ inputs.platforms }} == *"arm"* ]]; then | ||
echo "SETUP_QEMU=1" >> $GITHUB_OUTPUT | ||
else | ||
echo "SETUP_QEMU=0" >> $GITHUB_OUTPUT | ||
fi | ||
shell: bash | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
if: ${{ steps.check-qemu.outputs.SETUP_QEMU == '1' }} | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ inputs.username }} | ||
password: ${{ inputs.password }} | ||
|
||
- name: Run buildx build | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: . | ||
build-args: | | ||
"GIT_REV=${{ env.GIT_REV }}" | ||
file: scripts/release/Dockerfile | ||
platforms: ${{ inputs.platforms }} | ||
load: ${{ inputs.load }} | ||
push: ${{ inputs.push }} | ||
tags: ${{ env.TAGS }} | ||
# TODO: uncomment once cache stuff is resolved... | ||
# cache-from: type=local,src=/tmp/.buildx-cache | ||
# cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max | ||
|
||
# https://github.com/docker/build-push-action/issues/252 | ||
# TODO: https://github.com/moby/buildkit/issues/1896 | ||
# TODO: uncomment once cache stuff is resolved... | ||
# - name: Move buildx cache | ||
# run: | | ||
# rm -rf /tmp/.buildx-cache | ||
# mv /tmp/.buildx-cache-new /tmp/.buildx-cache | ||
# shell: bash |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,27 @@ | ||
name: 'Build Web Application' | ||
description: "Build web application and upload it's artifacts" | ||
name: 'Compile Web Application' | ||
description: 'Compile stump web' | ||
|
||
runs: | ||
using: 'composite' | ||
using: composite | ||
steps: | ||
- name: Build | ||
uses: ./.github/actions/compile-web | ||
- name: Checkout project | ||
uses: actions/checkout@v3 | ||
|
||
- name: Upload | ||
- name: Setup pnpm | ||
uses: ./.github/actions/setup-pnpm | ||
|
||
- name: Install dependencies | ||
shell: bash | ||
run: pnpm install | ||
working-directory: apps/web | ||
|
||
- name: Build app | ||
shell: bash | ||
run: pnpm run build | ||
working-directory: apps/web | ||
|
||
- name: Upload bundle | ||
uses: ./.github/actions/upload-artifact | ||
with: | ||
upload-name: web | ||
upload-name: webapp | ||
upload-path: apps/web/dist |
This file was deleted.
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
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
Oops, something went wrong.