ci: revise build config
This commit is contained in:
parent
0c4826becf
commit
7fe7f90350
2 changed files with 23 additions and 10 deletions
|
@ -1,4 +1,4 @@
|
||||||
image: docker.io/node:18-alpine
|
image: docker.io/rust:slim-bookworm
|
||||||
|
|
||||||
services:
|
services:
|
||||||
- name: docker.io/groonga/pgroonga:latest-alpine-12-slim
|
- name: docker.io/groonga/pgroonga:latest-alpine-12-slim
|
||||||
|
@ -15,26 +15,36 @@ workflow:
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
paths:
|
paths:
|
||||||
- node_modules/
|
- node_modules
|
||||||
- target/
|
- /cache/cargo/registry/index
|
||||||
|
- /cache/cargo/registry/cache
|
||||||
|
- target/debug/deps
|
||||||
|
- target/debug/build
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- test
|
- test
|
||||||
|
|
||||||
variables:
|
variables:
|
||||||
POSTGRES_DB: firefish_db
|
POSTGRES_DB: 'firefish_db'
|
||||||
POSTGRES_USER: firefish
|
POSTGRES_USER: 'firefish'
|
||||||
POSTGRES_PASSWORD: password
|
POSTGRES_PASSWORD: 'password'
|
||||||
POSTGRES_HOST_AUTH_METHOD: trust
|
POSTGRES_HOST_AUTH_METHOD: 'trust'
|
||||||
|
DEBIAN_FRONTEND: 'noninteractive'
|
||||||
|
CARGO_PROFILE_DEV_OPT_LEVEL: '0'
|
||||||
|
CARGO_PROFILE_DEV_LTO: 'off'
|
||||||
|
CARGO_PROFILE_DEV_DEBUG: 'none'
|
||||||
|
CARGO_HOME: '/cache/cargo'
|
||||||
|
|
||||||
default:
|
default:
|
||||||
before_script:
|
before_script:
|
||||||
- apk add --update build-base linux-headers curl ca-certificates python3 perl postgresql-client
|
- apt-get -y install curl
|
||||||
- curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
- curl -fsSL 'https://deb.nodesource.com/setup_18.x' | sudo -E bash -
|
||||||
- . "${HOME}/.cargo/env"
|
- apt-get update && apt-get upgrade
|
||||||
|
- apt-get install -y build-essential clang mold python3 perl nodejs postgresql-client
|
||||||
- corepack enable
|
- corepack enable
|
||||||
- corepack prepare pnpm@latest --activate
|
- corepack prepare pnpm@latest --activate
|
||||||
- cp .config/ci.yml .config/default.yml
|
- cp .config/ci.yml .config/default.yml
|
||||||
|
- cp ci/cargo/config.toml "${CARGO_HOME}/config.toml"
|
||||||
- export PGPASSWORD="${POSTGRES_PASSWORD}"
|
- export PGPASSWORD="${POSTGRES_PASSWORD}"
|
||||||
- psql --host postgres --user "${POSTGRES_USER}" --dbname "${POSTGRES_DB}" --command 'CREATE EXTENSION pgroonga'
|
- psql --host postgres --user "${POSTGRES_USER}" --dbname "${POSTGRES_DB}" --command 'CREATE EXTENSION pgroonga'
|
||||||
|
|
||||||
|
|
3
ci/cargo/config.toml
Normal file
3
ci/cargo/config.toml
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
[target.x86_64-unknown-linux-gnu]
|
||||||
|
linker = "/usr/bin/clang"
|
||||||
|
rustflags = ["-C", "link-arg=--ld-path=/usr/bin/mold"]
|
Loading…
Reference in a new issue