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:
parent
475c16f627
commit
caea17ccb2
2 changed files with 18 additions and 6 deletions
|
@ -1,3 +1,5 @@
|
||||||
|
# TODO:
|
||||||
|
# - [ ] prepare a forgejo ci image with the necessary tools and forgejo user
|
||||||
runs:
|
runs:
|
||||||
using: "composite"
|
using: "composite"
|
||||||
steps:
|
steps:
|
||||||
|
@ -7,6 +9,7 @@ runs:
|
||||||
# ignore if the user already exists (like with the playwright image)
|
# ignore if the user already exists (like with the playwright image)
|
||||||
adduser --quiet --comment forgejo --disabled-password forgejo || true
|
adduser --quiet --comment forgejo --disabled-password forgejo || true
|
||||||
chown -R forgejo:forgejo .
|
chown -R forgejo:forgejo .
|
||||||
|
|
||||||
- uses: https://codeberg.org/fnetx/setup-cache-go@b2214eaf6fb44c7e8512c0f462a2c3ec31f86a73
|
- uses: https://codeberg.org/fnetx/setup-cache-go@b2214eaf6fb44c7e8512c0f462a2c3ec31f86a73
|
||||||
with:
|
with:
|
||||||
username: forgejo
|
username: forgejo
|
||||||
|
|
|
@ -14,6 +14,7 @@ jobs:
|
||||||
runs-on: docker
|
runs-on: docker
|
||||||
container:
|
container:
|
||||||
image: 'code.forgejo.org/oci/node:20-bookworm'
|
image: 'code.forgejo.org/oci/node:20-bookworm'
|
||||||
|
options: --tmpfs /tmp:exec,noatime
|
||||||
steps:
|
steps:
|
||||||
- name: event info
|
- name: event info
|
||||||
run: |
|
run: |
|
||||||
|
@ -30,6 +31,7 @@ jobs:
|
||||||
runs-on: docker
|
runs-on: docker
|
||||||
container:
|
container:
|
||||||
image: 'code.forgejo.org/oci/node:20-bookworm'
|
image: 'code.forgejo.org/oci/node:20-bookworm'
|
||||||
|
options: --tmpfs /tmp:exec,noatime
|
||||||
steps:
|
steps:
|
||||||
- uses: https://code.forgejo.org/actions/checkout@v4
|
- uses: https://code.forgejo.org/actions/checkout@v4
|
||||||
- run: make deps-frontend
|
- run: make deps-frontend
|
||||||
|
@ -54,6 +56,7 @@ jobs:
|
||||||
needs: [backend-checks, frontend-checks]
|
needs: [backend-checks, frontend-checks]
|
||||||
container:
|
container:
|
||||||
image: 'code.forgejo.org/oci/node:20-bookworm'
|
image: 'code.forgejo.org/oci/node:20-bookworm'
|
||||||
|
options: --tmpfs /tmp:exec,noatime
|
||||||
services:
|
services:
|
||||||
elasticsearch:
|
elasticsearch:
|
||||||
image: code.forgejo.org/oci/bitnami/elasticsearch:7
|
image: code.forgejo.org/oci/bitnami/elasticsearch:7
|
||||||
|
@ -64,7 +67,7 @@ jobs:
|
||||||
minio:
|
minio:
|
||||||
image: code.forgejo.org/oci/bitnami/minio:2024.8.17
|
image: code.forgejo.org/oci/bitnami/minio:2024.8.17
|
||||||
options: >-
|
options: >-
|
||||||
--hostname gitea.minio --tmpfs /bitnami/minio/data
|
--hostname gitea.minio --tmpfs /bitnami/minio/data:noatime
|
||||||
env:
|
env:
|
||||||
MINIO_DOMAIN: minio
|
MINIO_DOMAIN: minio
|
||||||
MINIO_ROOT_USER: 123456
|
MINIO_ROOT_USER: 123456
|
||||||
|
@ -94,6 +97,7 @@ jobs:
|
||||||
needs: [backend-checks, frontend-checks]
|
needs: [backend-checks, frontend-checks]
|
||||||
container:
|
container:
|
||||||
image: 'code.forgejo.org/oci/playwright:latest'
|
image: 'code.forgejo.org/oci/playwright:latest'
|
||||||
|
options: --tmpfs /tmp:exec,noatime
|
||||||
steps:
|
steps:
|
||||||
- uses: https://code.forgejo.org/actions/checkout@v4
|
- uses: https://code.forgejo.org/actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
|
@ -135,22 +139,23 @@ jobs:
|
||||||
needs: [backend-checks, frontend-checks, test-unit]
|
needs: [backend-checks, frontend-checks, test-unit]
|
||||||
container:
|
container:
|
||||||
image: 'code.forgejo.org/oci/node:20-bookworm'
|
image: 'code.forgejo.org/oci/node:20-bookworm'
|
||||||
|
options: --tmpfs /tmp:exec,noatime
|
||||||
name: ${{ format('test-remote-cacher ({0})', matrix.cacher.name) }}
|
name: ${{ format('test-remote-cacher ({0})', matrix.cacher.name) }}
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
cacher:
|
cacher:
|
||||||
- name: redis
|
- name: redis
|
||||||
image: code.forgejo.org/oci/bitnami/redis:7.2
|
image: code.forgejo.org/oci/bitnami/redis:7.2
|
||||||
options: --tmpfs /bitnami/redis/data
|
options: --tmpfs /bitnami/redis/data:noatime
|
||||||
- name: redict
|
- name: redict
|
||||||
image: registry.redict.io/redict:7.3.0-scratch
|
image: registry.redict.io/redict:7.3.0-scratch
|
||||||
options: --tmpfs /data
|
options: --tmpfs /data:noatime
|
||||||
- name: valkey
|
- name: valkey
|
||||||
image: code.forgejo.org/oci/bitnami/valkey:7.2
|
image: code.forgejo.org/oci/bitnami/valkey:7.2
|
||||||
options: --tmpfs /bitnami/redis/data
|
options: --tmpfs /bitnami/redis/data:noatime
|
||||||
- name: garnet
|
- name: garnet
|
||||||
image: ghcr.io/microsoft/garnet-alpine:1.0.14
|
image: ghcr.io/microsoft/garnet-alpine:1.0.14
|
||||||
options: --tmpfs /data
|
options: --tmpfs /data:noatime
|
||||||
services:
|
services:
|
||||||
cacher:
|
cacher:
|
||||||
image: ${{ matrix.cacher.image }}
|
image: ${{ matrix.cacher.image }}
|
||||||
|
@ -176,6 +181,7 @@ jobs:
|
||||||
needs: [backend-checks, frontend-checks]
|
needs: [backend-checks, frontend-checks]
|
||||||
container:
|
container:
|
||||||
image: 'code.forgejo.org/oci/node:20-bookworm'
|
image: 'code.forgejo.org/oci/node:20-bookworm'
|
||||||
|
options: --tmpfs /tmp:exec,noatime
|
||||||
services:
|
services:
|
||||||
mysql:
|
mysql:
|
||||||
image: 'code.forgejo.org/oci/bitnami/mysql:8.4'
|
image: 'code.forgejo.org/oci/bitnami/mysql:8.4'
|
||||||
|
@ -186,7 +192,7 @@ jobs:
|
||||||
# See also https://codeberg.org/forgejo/forgejo/issues/976
|
# 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
|
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:
|
steps:
|
||||||
- uses: https://code.forgejo.org/actions/checkout@v4
|
- uses: https://code.forgejo.org/actions/checkout@v4
|
||||||
- uses: ./.forgejo/workflows-composite/setup-env
|
- uses: ./.forgejo/workflows-composite/setup-env
|
||||||
|
@ -206,6 +212,7 @@ jobs:
|
||||||
needs: [backend-checks, frontend-checks]
|
needs: [backend-checks, frontend-checks]
|
||||||
container:
|
container:
|
||||||
image: 'code.forgejo.org/oci/node:20-bookworm'
|
image: 'code.forgejo.org/oci/node:20-bookworm'
|
||||||
|
options: --tmpfs /tmp:exec,noatime
|
||||||
services:
|
services:
|
||||||
minio:
|
minio:
|
||||||
image: code.forgejo.org/oci/bitnami/minio:2024.8.17
|
image: code.forgejo.org/oci/bitnami/minio:2024.8.17
|
||||||
|
@ -244,6 +251,7 @@ jobs:
|
||||||
needs: [backend-checks, frontend-checks]
|
needs: [backend-checks, frontend-checks]
|
||||||
container:
|
container:
|
||||||
image: 'code.forgejo.org/oci/node:20-bookworm'
|
image: 'code.forgejo.org/oci/node:20-bookworm'
|
||||||
|
options: --tmpfs /tmp:exec,noatime
|
||||||
steps:
|
steps:
|
||||||
- uses: https://code.forgejo.org/actions/checkout@v4
|
- uses: https://code.forgejo.org/actions/checkout@v4
|
||||||
- uses: ./.forgejo/workflows-composite/setup-env
|
- uses: ./.forgejo/workflows-composite/setup-env
|
||||||
|
@ -271,6 +279,7 @@ jobs:
|
||||||
- test-unit
|
- test-unit
|
||||||
container:
|
container:
|
||||||
image: 'code.forgejo.org/oci/node:20-bookworm'
|
image: 'code.forgejo.org/oci/node:20-bookworm'
|
||||||
|
options: --tmpfs /tmp:exec,noatime
|
||||||
steps:
|
steps:
|
||||||
- uses: https://code.forgejo.org/actions/checkout@v4
|
- uses: https://code.forgejo.org/actions/checkout@v4
|
||||||
- uses: ./.forgejo/workflows-composite/setup-env
|
- uses: ./.forgejo/workflows-composite/setup-env
|
||||||
|
|
Loading…
Reference in a new issue