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

Commit

Permalink
perf: improving performance, layout (#215)
Browse files Browse the repository at this point in the history
Co-authored-by: nullishamy <git@amyerskine.me>
  • Loading branch information
iruzo and nullishamy authored Jun 1, 2024
1 parent 54633c0 commit cadc3e2
Show file tree
Hide file tree
Showing 37 changed files with 1,015 additions and 665 deletions.
51 changes: 41 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,64 @@ name: "Generate test artifacts"
on:
pull_request:
types: [opened, reopened, synchronize]

# env:
# TAG: latest

jobs:
build:
runs-on: ubuntu-latest

# container:
# image: ghcr.io/${{ github.repository_owner }}/${{ github.repository }}:${{ env.TAG }}
#
# # is this really necessary?
# credentials:
# username: ${{ github.actor }}
# password: ${{ secrets.GITHUB_TOKEN }}

steps:

- name: Checkout
uses: actions/checkout@v4
with:
submodules: true

- uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: "pip"

- name: Install dependencies
run: pip install -r requirements.txt
- name: Install colloid specific dependencies
run: sudo apt update && sudo apt install -y sassc inkscape optipng
run: |
sudo apt update && sudo apt install -y sassc inkscape optipng
pip install -r requirements.txt
- name: Generate themes
run: |
python patches/xfwm4/generate_assets.py
set -eu pipefile
python sources/patches/xfwm4/generate_assets.py
python ./build.py mocha --all-accents --zip -d $PWD/releases > mocha.log 2>&1 &
python ./build.py macchiato --all-accents --zip -d $PWD/releases > macchiato.log 2>&1 &
python ./build.py frappe --all-accents --zip -d $PWD/releases > frappe.log 2>&1 &
python ./build.py latte --all-accents --zip -d $PWD/releases > latte.log 2>&1 &
declare -i err=0 werr=0
while wait -fn || werr=$?; ((werr != 127)); do
err=$werr
if [[ $err -ne 0 ]]; then
echo "Build failure, abort"
cat *.log
exit 1
fi
done
cat *.log
python ./build.py mocha --all-accents --zip -d $PWD/releases &&
python ./build.py macchiato --all-accents --zip -d $PWD/releases &&
python ./build.py frappe --all-accents --zip -d $PWD/releases &&
python ./build.py latte --all-accents --zip -d $PWD/releases
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: '${{ github.sha }}-artifacts'
path: ./releases/*.zip

path: ./releases/*.zip
27 changes: 27 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: "Publish containers for build"

on:
workflow_dispatch:
pull_request:
# types: [opened, reopened, synchronize]
types: [synchronize]

permissions: write-all

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true

- name: Generate and push image to ghcr
run: |
# build docker image for the ci
sh docker/build.sh -v no
# push the image to the registry
sh docker/push.sh -u "${{ github.actor }}" -p "${{ secrets.GITHUB_TOKEN }}"
30 changes: 24 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,22 +28,40 @@ jobs:
uses: actions/checkout@v4
with:
submodules: true

- uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: "pip"

- name: Install dependencies
run: pip install -r requirements.txt

- name: Install colloid specific dependencies
run: sudo apt update && sudo apt install -y sassc inkscape optipng

- name: Generate themes
run: |
python patches/xfwm4/generate_assets.py
python ./build.py mocha --all-accents --zip -d $PWD/releases &&
python ./build.py macchiato --all-accents --zip -d $PWD/releases &&
python ./build.py frappe --all-accents --zip -d $PWD/releases &&
python ./build.py latte --all-accents --zip -d $PWD/releases
set -eu pipefile
python sources/patches/xfwm4/generate_assets.py
python ./build.py mocha --all-accents --zip -d $PWD/releases > mocha.log 2>&1 &
python ./build.py macchiato --all-accents --zip -d $PWD/releases > macchiato.log 2>&1 &
python ./build.py frappe --all-accents --zip -d $PWD/releases > frappe.log 2>&1 &
python ./build.py latte --all-accents --zip -d $PWD/releases > latte.log 2>&1 &
declare -i err=0 werr=0
while wait -fn || werr=$?; ((werr != 127)); do
err=$werr
if [[ $err -ne 0 ]]; then
echo "Build failure, abort"
cat *.log
exit 1
fi
done
cat *.log
- name: Add zips to release
run: gh release upload ${{ needs.release-please.outputs.tag_name }} releases/*.zip
env:
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ lib*/
*.cfg
.direnv
build/
*.log
.ruff-cache
.tmp

# Releases folder
releases
Expand Down
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "colloid"]
path = colloid
path = sources/colloid
url = https://github.com/vinceliuice/Colloid-gtk-theme.git
Loading

0 comments on commit cadc3e2

Please sign in to comment.