|
9 | 9 | # Specify the execution environment. You can specify an image from Dockerhub or use one of our Convenience Images from CircleCI's Developer Hub. |
10 | 10 | # See: https://circleci.com/docs/2.0/configuration-reference/#docker-machine-macos-windows-executor |
11 | 11 | docker: |
12 | | - - image: levkk/pgcat-ci:latest |
| 12 | + - image: ghcr.io/levkk/pgcat-ci:latest |
13 | 13 | environment: |
14 | 14 | RUST_LOG: info |
15 | | - RUSTFLAGS: "-C instrument-coverage" |
16 | | - LLVM_PROFILE_FILE: "pgcat-%m.profraw" |
| 15 | + LLVM_PROFILE_FILE: /tmp/pgcat-%m-%p.profraw |
| 16 | + RUSTC_BOOTSTRAP: 1 |
| 17 | + CARGO_INCREMENTAL: 0 |
| 18 | + RUSTFLAGS: "-Zprofile -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests -Cpanic=abort -Cinstrument-coverage" |
| 19 | + RUSTDOCFLAGS: "-Cpanic=abort" |
17 | 20 | - image: postgres:14 |
18 | 21 | command: ["postgres", "-p", "5432", "-c", "shared_preload_libraries=pg_stat_statements"] |
19 | 22 | environment: |
20 | 23 | POSTGRES_USER: postgres |
21 | 24 | POSTGRES_DB: postgres |
22 | 25 | POSTGRES_PASSWORD: postgres |
23 | | - POSTGRES_HOST_AUTH_METHOD: scram-sha-256 |
| 26 | + POSTGRES_INITDB_ARGS: --auth-local=md5 --auth-host=md5 --auth=md5 |
24 | 27 | - image: postgres:14 |
25 | 28 | command: ["postgres", "-p", "7432", "-c", "shared_preload_libraries=pg_stat_statements"] |
26 | 29 | environment: |
27 | 30 | POSTGRES_USER: postgres |
28 | 31 | POSTGRES_DB: postgres |
29 | 32 | POSTGRES_PASSWORD: postgres |
30 | | - POSTGRES_HOST_AUTH_METHOD: scram-sha-256 |
| 33 | + POSTGRES_INITDB_ARGS: --auth-local=scram-sha-256 --auth-host=scram-sha-256 --auth=scram-sha-256 |
31 | 34 | - image: postgres:14 |
32 | 35 | command: ["postgres", "-p", "8432", "-c", "shared_preload_libraries=pg_stat_statements"] |
33 | 36 | environment: |
34 | 37 | POSTGRES_USER: postgres |
35 | 38 | POSTGRES_DB: postgres |
36 | 39 | POSTGRES_PASSWORD: postgres |
37 | | - POSTGRES_HOST_AUTH_METHOD: scram-sha-256 |
| 40 | + POSTGRES_INITDB_ARGS: --auth-local=scram-sha-256 --auth-host=scram-sha-256 --auth=scram-sha-256 |
38 | 41 | - image: postgres:14 |
39 | 42 | command: ["postgres", "-p", "9432", "-c", "shared_preload_libraries=pg_stat_statements"] |
40 | 43 | environment: |
41 | 44 | POSTGRES_USER: postgres |
42 | 45 | POSTGRES_DB: postgres |
43 | 46 | POSTGRES_PASSWORD: postgres |
44 | | - POSTGRES_HOST_AUTH_METHOD: scram-sha-256 |
| 47 | + POSTGRES_INITDB_ARGS: --auth-local=scram-sha-256 --auth-host=scram-sha-256 --auth=scram-sha-256 |
45 | 48 |
|
46 | 49 | # Add steps to the job |
47 | 50 | # See: https://circleci.com/docs/2.0/configuration-reference/#steps |
|
52 | 55 | - run: |
53 | 56 | name: "Lint" |
54 | 57 | command: "cargo fmt --check" |
55 | | - - run: |
56 | | - name: "Install dependencies" |
57 | | - command: "sudo apt-get update && sudo apt-get install -y psmisc postgresql-contrib-12 postgresql-client-12 ruby ruby-dev libpq-dev python3 python3-pip lcov llvm-11 iproute2 && sudo apt-get upgrade curl" |
58 | | - - run: |
59 | | - name: "Install rust tools" |
60 | | - command: "cargo install cargo-binutils rustfilt && rustup component add llvm-tools-preview" |
61 | | - - run: |
62 | | - name: "Build" |
63 | | - command: "cargo build" |
64 | 58 | - run: |
65 | 59 | name: "Tests" |
66 | | - command: "cargo test && bash .circleci/run_tests.sh && .circleci/generate_coverage.sh" |
| 60 | + command: "cargo clean && cargo build && cargo test && bash .circleci/run_tests.sh && .circleci/generate_coverage.sh" |
67 | 61 | - store_artifacts: |
68 | 62 | path: /tmp/cov |
69 | 63 | destination: coverage-data |
|
0 commit comments