0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-12-22 23:33:15 -05:00

ci: use more tmpfs and noatime for faster CI

This commit is contained in:
Michael Kriese 2024-11-19 10:50:18 +01:00
parent 475c16f627
commit caea17ccb2
No known key found for this signature in database
GPG key ID: F8D7748549A5986A
2 changed files with 18 additions and 6 deletions

View file

@ -1,3 +1,5 @@
# TODO:
# - [ ] prepare a forgejo ci image with the necessary tools and forgejo user
runs:
using: "composite"
steps:
@ -7,6 +9,7 @@ runs:
# ignore if the user already exists (like with the playwright image)
adduser --quiet --comment forgejo --disabled-password forgejo || true
chown -R forgejo:forgejo .
- uses: https://codeberg.org/fnetx/setup-cache-go@b2214eaf6fb44c7e8512c0f462a2c3ec31f86a73
with:
username: forgejo

View file

@ -14,6 +14,7 @@ jobs:
runs-on: docker
container:
image: 'code.forgejo.org/oci/node:20-bookworm'
options: --tmpfs /tmp:exec,noatime
steps:
- name: event info
run: |
@ -30,6 +31,7 @@ jobs:
runs-on: docker
container:
image: 'code.forgejo.org/oci/node:20-bookworm'
options: --tmpfs /tmp:exec,noatime
steps:
- uses: https://code.forgejo.org/actions/checkout@v4
- run: make deps-frontend
@ -54,6 +56,7 @@ jobs:
needs: [backend-checks, frontend-checks]
container:
image: 'code.forgejo.org/oci/node:20-bookworm'
options: --tmpfs /tmp:exec,noatime
services:
elasticsearch:
image: code.forgejo.org/oci/bitnami/elasticsearch:7
@ -64,7 +67,7 @@ jobs:
minio:
image: code.forgejo.org/oci/bitnami/minio:2024.8.17
options: >-
--hostname gitea.minio --tmpfs /bitnami/minio/data
--hostname gitea.minio --tmpfs /bitnami/minio/data:noatime
env:
MINIO_DOMAIN: minio
MINIO_ROOT_USER: 123456
@ -94,6 +97,7 @@ jobs:
needs: [backend-checks, frontend-checks]
container:
image: 'code.forgejo.org/oci/playwright:latest'
options: --tmpfs /tmp:exec,noatime
steps:
- uses: https://code.forgejo.org/actions/checkout@v4
with:
@ -135,22 +139,23 @@ jobs:
needs: [backend-checks, frontend-checks, test-unit]
container:
image: 'code.forgejo.org/oci/node:20-bookworm'
options: --tmpfs /tmp:exec,noatime
name: ${{ format('test-remote-cacher ({0})', matrix.cacher.name) }}
strategy:
matrix:
cacher:
- name: redis
image: code.forgejo.org/oci/bitnami/redis:7.2
options: --tmpfs /bitnami/redis/data
options: --tmpfs /bitnami/redis/data:noatime
- name: redict
image: registry.redict.io/redict:7.3.0-scratch
options: --tmpfs /data
options: --tmpfs /data:noatime
- name: valkey
image: code.forgejo.org/oci/bitnami/valkey:7.2
options: --tmpfs /bitnami/redis/data
options: --tmpfs /bitnami/redis/data:noatime
- name: garnet
image: ghcr.io/microsoft/garnet-alpine:1.0.14
options: --tmpfs /data
options: --tmpfs /data:noatime
services:
cacher:
image: ${{ matrix.cacher.image }}
@ -176,6 +181,7 @@ jobs:
needs: [backend-checks, frontend-checks]
container:
image: 'code.forgejo.org/oci/node:20-bookworm'
options: --tmpfs /tmp:exec,noatime
services:
mysql:
image: 'code.forgejo.org/oci/bitnami/mysql:8.4'
@ -186,7 +192,7 @@ jobs:
# See also https://codeberg.org/forgejo/forgejo/issues/976
#
MYSQL_EXTRA_FLAGS: --innodb-adaptive-flushing=OFF --innodb-buffer-pool-size=4G --innodb-log-buffer-size=128M --innodb-flush-log-at-trx-commit=0 --innodb-flush-log-at-timeout=30 --innodb-flush-method=nosync --innodb-fsync-threshold=1000000000 --disable-log-bin
options: --tmpfs /bitnami/mysql/data
options: --tmpfs /bitnami/mysql/data:noatime
steps:
- uses: https://code.forgejo.org/actions/checkout@v4
- uses: ./.forgejo/workflows-composite/setup-env
@ -206,6 +212,7 @@ jobs:
needs: [backend-checks, frontend-checks]
container:
image: 'code.forgejo.org/oci/node:20-bookworm'
options: --tmpfs /tmp:exec,noatime
services:
minio:
image: code.forgejo.org/oci/bitnami/minio:2024.8.17
@ -244,6 +251,7 @@ jobs:
needs: [backend-checks, frontend-checks]
container:
image: 'code.forgejo.org/oci/node:20-bookworm'
options: --tmpfs /tmp:exec,noatime
steps:
- uses: https://code.forgejo.org/actions/checkout@v4
- uses: ./.forgejo/workflows-composite/setup-env
@ -271,6 +279,7 @@ jobs:
- test-unit
container:
image: 'code.forgejo.org/oci/node:20-bookworm'
options: --tmpfs /tmp:exec,noatime
steps:
- uses: https://code.forgejo.org/actions/checkout@v4
- uses: ./.forgejo/workflows-composite/setup-env