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

perf: improving performance, layout #215

Merged
merged 31 commits into from
Jun 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
86156aa
ref: stopped this nonesense of having everything in a single script
iruzo May 24, 2024
77a9d2e
fix: missed variable during the refactor
iruzo May 24, 2024
b1f5a7f
add: temporary dir for colloid based on flavour
iruzo May 24, 2024
01a84ed
ref: improving performance on build job by executing all flavors at the
iruzo May 24, 2024
a10f881
refactor: remove src_dir params; centralise in build ctx
nullishamy May 25, 2024
b629dd1
refactor: move to scripts/, cleanup, rework tweak application
nullishamy May 25, 2024
313462e
refactor: rework text substitution
nullishamy May 25, 2024
97a567d
ci: update workflows
nullishamy May 25, 2024
effd47b
ci: organise logs
nullishamy May 25, 2024
4ddb572
refactor: clean up entrypoints
nullishamy May 25, 2024
c48ba57
style: fmt/fix with ruff; remove sketchy path manipulation
nullishamy May 25, 2024
69e8889
refactor: rename sources
nullishamy May 25, 2024
6ed92bd
docs: project structure
nullishamy May 25, 2024
fba6c15
ci: update paths
nullishamy May 25, 2024
c4e6c98
fix: build path
nullishamy May 25, 2024
8830845
fix: patch paths
nullishamy May 25, 2024
5f2e3cc
fix: small path issues
nullishamy May 25, 2024
f73cab6
ci: fail when build errors
nullishamy May 26, 2024
4a52417
ci: polish
nullishamy May 26, 2024
ac93f54
ci: merge into single stage the installation of dependencies
iruzo May 26, 2024
6767f21
ref: removed duplicated code from execute_build on __init__.py
iruzo May 26, 2024
edd9fe5
add: docker/ - build, push and dockerfile for ci
iruzo May 28, 2024
cb21ce8
ci: push docker image to ghcr
iruzo May 28, 2024
4c8c35c
doc: .github/workflows/docker.yml
iruzo May 28, 2024
f1aeeb1
chore: add back patches
nullishamy May 28, 2024
ca2c85d
ci: use correct args; rename workflow
nullishamy May 28, 2024
68b020f
ci: try new permission
nullishamy May 28, 2024
fe760dd
fix: docker build ci
iruzo May 28, 2024
78f6fe4
add: use of container in ci (commented)
iruzo May 28, 2024
65a2cd6
ref: moved missed patch to sources/patches/colloid
iruzo May 28, 2024
4fadf58
docs: moved documentation from root dir to docs/
iruzo May 28, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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