Skip to content
This repository has been archived by the owner on May 19, 2024. It is now read-only.

Commit

Permalink
Remove all deprecated Golang code (#127)
Browse files Browse the repository at this point in the history
* Remove all deprecated Golang code

* rm
  • Loading branch information
wanjohiryan authored Aug 28, 2023
1 parent 539b2e3 commit 809623f
Show file tree
Hide file tree
Showing 77 changed files with 44 additions and 8,951 deletions.
14 changes: 0 additions & 14 deletions .TODO

This file was deleted.

118 changes: 27 additions & 91 deletions .github/workflows/ghcr-nvenc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,86 +16,35 @@ env:
BASE_TAG_PREFIX: nvenc

jobs:
build-go:
name: Build go binary
runs-on: ubuntu-latest
#
# do not run on forks
#
if: github.repository_owner == 'wanjohiryan'
steps:
-
name: Checkout repo
uses: actions/checkout@v3
-
name: Install robotgo
run: |
set -o pipefail
sudo apt-get update; \
sudo apt-get install -y xvfb \
libx11-dev libx11-dev xorg-dev libxtst-dev xsel xclip libpng++-dev xcb libxcb-xkb-dev x11-xkb-utils \
libx11-xcb-dev libxkbcommon-x11-dev libxkbcommon-dev
shell: bash
-
name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.18
#TODO: Find a way to test this before building
-
name: Build binary
run: go build -v ./
-
name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: gobinary
path: ./warp
retention-days: 5

build-certs:
name: Build self-signed certs
#
# do not run on forks
#
if: github.repository_owner == 'wanjohiryan'
runs-on: ubuntu-latest
steps:
-
name: Install mkcert
run: |
set -o pipefail
sudo apt-get update; \
sudo apt-get install wget; \
sudo wget -nv -O /usr/local/bin/mkcert https://github.com/FiloSottile/mkcert/releases/download/v1.4.3/mkcert-v1.4.3-linux-amd64; \
sudo chmod +x /usr/local/bin/mkcert;
shell: bash
-
name: Create certs
run: |
set -o pipefail
mkdir ./certs && cd ./certs
mkcert -cert-file localhost.crt -key-file localhost.key localhost 127.0.0.1 ::1
shell: bash
-
name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: certfiles
path: certs/
retention-days: 5

#FIXME: turn this into rust CI
# build-go:
# name: Build go binary
# runs-on: ubuntu-latest
# #
# # do not run on forks
# #
# steps:
# -
# name: Checkout repo
# uses: actions/checkout@v3
# -
# name: Set up Go
# uses: actions/setup-go@v4
# with:
# go-version: 1.18
# #TODO: Find a way to test this before building
# -
# name: Build binary
# run: go build -v ./
# -
# name: Upload artifact
# uses: actions/upload-artifact@v3
# with:
# name: gobinary
# path: ./warp
# retention-days: 5
build-nvidia-base:
runs-on: ubuntu-latest
needs:
- build-go
- build-certs
permissions:
contents: read
packages: write
Expand Down Expand Up @@ -126,19 +75,6 @@ jobs:
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
-
name: Download go binary
uses: actions/download-artifact@v3
with:
name: gobinary
path: ./
-
name: Download certs folder
uses: actions/download-artifact@v3
with:
name: certfiles
path: ./
- name: Build and push image
uses: docker/build-push-action@v4
Expand Down
117 changes: 17 additions & 100 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,96 +9,13 @@ on:
# - 'internal/ui/**'

jobs:
build-go:
name: Build go binary
runs-on: ubuntu-latest
steps:
-
name: Checkout repo
uses: actions/checkout@v3
-
name: Install robotgo
run: |
set -o pipefail
sudo apt-get update; \
sudo apt-get install -y xvfb \
libx11-dev libx11-dev xorg-dev libxtst-dev xsel xclip libpng++-dev xcb libxcb-xkb-dev x11-xkb-utils \
libx11-xcb-dev libxkbcommon-x11-dev libxkbcommon-dev;
shell: bash
-
name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.18
#TODO: Find a way to test this before building
-
name: Build binary
run: go build -v ./
-
name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: gobinary
path: ./warp
retention-days: 5

build-certs:
name: Build self-signed certs
runs-on: ubuntu-latest
steps:
-
name: Install mkcert
run: |
set -o pipefail
sudo apt-get update; \
sudo apt-get install wget; \
sudo wget -nv -O /usr/local/bin/mkcert https://github.com/FiloSottile/mkcert/releases/download/v1.4.3/mkcert-v1.4.3-linux-amd64; \
sudo chmod +x /usr/local/bin/mkcert;
shell: bash
-
name: Create certs
run: |
set -o pipefail
mkdir ./certs && cd ./certs
mkcert -cert-file localhost.crt -key-file localhost.key localhost 127.0.0.1 ::1
shell: bash
-
name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: certfiles
path: certs/
retention-days: 5

build-docker-nvidia:
name: Build nvidia base image
needs:
- build-go
- build-certs
name: Build base image
runs-on: ubuntu-latest
steps:
-
name: Checkout repo
uses: actions/checkout@v3
-
name: Download go binary
uses: actions/download-artifact@v3
with:
name: gobinary
path: ./
-
name: Download certs folder
uses: actions/download-artifact@v3
with:
name: certfiles
path: ./
-
name: Setup Docker Buildx
uses: docker/setup-buildx-action@v2
Expand All @@ -111,19 +28,19 @@ jobs:
push: false
load: true
tags: warp:nvenc
-
name: Run Docker Container
#error code 124 is timeout error
run: |
set -o pipefail
output=$(timeout 2m docker run warp:nvenc 2>&1) || exitcode=$?
if [[ $exitcode != 0 && $exitcode != 124 ]]; then
echo "$output"
exit $exitcode
else
echo "$output"
echo -e "\033[01;34mDocker run successful\033[0m"
exit 0
fi
shell: bash
# -
# name: Run Docker Container
# #error code 124 is timeout error
# run: |
# set -o pipefail
# output=$(timeout 2m docker run warp:nvenc 2>&1) || exitcode=$?

# if [[ $exitcode != 0 && $exitcode != 124 ]]; then
# echo "$output"
# exit $exitcode
# else
# echo "$output"
# echo -e "\033[01;34mDocker run successful\033[0m"
# exit 0
# fi
# shell: bash
8 changes: 0 additions & 8 deletions docker/nvidia/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -172,20 +172,12 @@ ENTRYPOINT [ "/usr/bin/tini","--" ]
COPY docker/nvidia/entrypoint.sh /etc/warp/entrypoint.sh
RUN chmod +x /etc/warp/entrypoint.sh

COPY localhost.crt localhost.key /certs/

ENV CERT_FILE /certs/localhost.crt
ENV KEY_FILE /certs/localhost.key

COPY docker/nvidia/ffmpeg.sh /etc/warp/ffmpeg.sh
RUN chmod +x /etc/warp/ffmpeg.sh

COPY docker/nvidia/run-wine.sh /etc/warp/run-wine.sh
RUN chmod +x /etc/warp/run-wine.sh

COPY warp /usr/bin/warp/warp
RUN chmod +x /usr/bin/warp/warp


ENV USER ${USERNAME}
ENV SHELL /bin/bash
Expand Down
46 changes: 0 additions & 46 deletions go.mod

This file was deleted.

Loading

0 comments on commit 809623f

Please sign in to comment.