mirror of
https://github.com/ivabus/gui
synced 2025-04-23 05:57:11 +03:00
#172 ci cache implementation: pnpm store and cargo build target
This commit is contained in:
parent
47ce8fa5fe
commit
32679959ba
6 changed files with 56 additions and 11 deletions
20
.github/workflows/ci.yml
vendored
20
.github/workflows/ci.yml
vendored
|
@ -67,8 +67,15 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: cache gui linux
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
key: linux+x86-64-20-pnpm-cargo
|
||||
path: |
|
||||
./pnpm
|
||||
./target
|
||||
- name: build tauri for Linux
|
||||
uses: docker://getneil/tea-builder:latest
|
||||
uses: ./devops/linux-builder
|
||||
- uses: aws-actions/configure-aws-credentials@v1
|
||||
with:
|
||||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
|
@ -120,6 +127,15 @@ jobs:
|
|||
- uses: teaxyz/setup@v0
|
||||
if: startsWith(matrix.platform.name, 'darwin')
|
||||
|
||||
- name: cache gui build
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
key: ${{matrix.platform.name}}-pnpm-cargo
|
||||
path: |
|
||||
./pnpm
|
||||
./target
|
||||
# - name: build tauri for Linux
|
||||
# uses: ./devops/linux-build
|
||||
- name: build tauri for MacOS
|
||||
if: startsWith(matrix.platform.name, 'darwin')
|
||||
# FROM: https://tauri.app/v1/guides/distribution/sign-macos
|
||||
|
@ -134,7 +150,7 @@ jobs:
|
|||
- name: build tauri for Linux
|
||||
if: startsWith(matrix.platform.name, 'linux')
|
||||
# TODO: https://tauri.app/v1/guides/distribution/sign-linux
|
||||
uses: docker://getneil/tea-builder:latest
|
||||
uses: ./devops/linux-builder
|
||||
|
||||
- run: tar -czvf artifacts.tgz -C ./modules/gui/src-tauri/target/release/bundle .
|
||||
|
||||
|
|
5
devops/linux-builder/Dockerfile
Normal file
5
devops/linux-builder/Dockerfile
Normal file
|
@ -0,0 +1,5 @@
|
|||
FROM getneil/tea-builder:bincache
|
||||
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
18
devops/linux-builder/action.yml
Normal file
18
devops/linux-builder/action.yml
Normal file
|
@ -0,0 +1,18 @@
|
|||
name: 'build-gui-linux'
|
||||
description: 'Tea GUI builder for linux'
|
||||
# TODO: cache
|
||||
# inputs:
|
||||
# who-to-greet: # id of input
|
||||
# description: 'Who to greet'
|
||||
# required: true
|
||||
# default: 'World'
|
||||
# outputs:
|
||||
# time: # id of output
|
||||
# description: 'The time we greeted you'
|
||||
runs:
|
||||
using: 'docker'
|
||||
image: 'Dockerfile'
|
||||
env:
|
||||
CARGO_TARGET_DIR: /github/workspace/target
|
||||
args:
|
||||
- ${{ inputs.who-to-greet }}
|
3
devops/linux-builder/entrypoint.sh
Executable file
3
devops/linux-builder/entrypoint.sh
Executable file
|
@ -0,0 +1,3 @@
|
|||
#!/bin/sh -l
|
||||
tea -SE xc setup
|
||||
tea -SE xc build
|
|
@ -7,11 +7,21 @@ RUN apt-get install -y libgtk-3-dev webkit2gtk-4.0
|
|||
RUN apt-get install -y --fix-missing libappindicator3-dev librsvg2-dev
|
||||
RUN apt-get install -y --fix-missing patchelf pkg-config curl libatomic1 gcc-multilib libsoup-gnome2.4
|
||||
RUN apt-get install -y libjavascriptcoregtk-4.0-dev wget
|
||||
|
||||
RUN curl https://tea.xyz -o ./tea.sh
|
||||
RUN chmod +x tea.sh
|
||||
RUN ./tea.sh --yes
|
||||
# Copies your code file from your action repository to the filesystem path `/` of the container
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
|
||||
RUN mkdir -p /tmp/app/.git
|
||||
COPY README.md /tmp/app/README.md
|
||||
COPY package.json /tmp/app/package.json
|
||||
|
||||
RUN tea +nodejs.org
|
||||
RUN tea +pnpm.io
|
||||
RUN tea +rust-lang.org
|
||||
RUN tea +rust-lang.org/cargo
|
||||
RUN tea +xcfile.dev
|
||||
|
||||
# Code file to execute when the docker container starts up (`entrypoint.sh`)
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
|
@ -74,13 +74,6 @@
|
|||
padding: 0vw 3.33vw;
|
||||
}
|
||||
}
|
||||
header {
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
width: 100%;
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
slot {
|
||||
z-index: 1;
|
||||
|
|
Loading…
Reference in a new issue