File tree Expand file tree Collapse file tree 1 file changed +35
-5
lines changed Expand file tree Collapse file tree 1 file changed +35
-5
lines changed Original file line number Diff line number Diff line change 99
1010jobs :
1111 build_and_test :
12- name : Rust project - latest
12+ name : etcd_fdw Build and Test
1313 runs-on : ubuntu-latest
1414 steps :
1515 - uses : actions/checkout@v4
16- - run : rustup update stable && rustup default stable
17- - run : cargo install cargo-pgrx --version 0.16.0
18- - run : cargo build --verbose
19- - run : cargo pgrx test --verbose
16+
17+ - name : Cache build/deps
18+ uses : actions/cache@v4
19+ with :
20+ path : |
21+ ~/.cargo/bin/
22+ ~/.cargo/registry/index/
23+ ~/.cargo/registry/cache/
24+ ~/.cargo/git/db/
25+ target/
26+ key : cargo-${{ hashFiles('**/Cargo.lock') }}
27+
28+ - name : Cache pgrx
29+ uses : actions/cache@v4
30+ with :
31+ path : |
32+ ~/.pgrx/
33+ key : pgrx-0.16.0
34+
35+ - name : Install latest stable toolchain
36+ uses : actions-rs/toolchain@v1
37+ with :
38+ toolchain : stable
39+ override : true
40+ components : rustfmt, clippy
41+ - run : apt update
42+ - run : apt install build-essential bison flex clang protobuf-compiler -y
43+ - name : Create user
44+ run : |
45+ useradd -m test_user
46+ - run : sudo -u test_user cargo install cargo-pgrx --version 0.16.0
47+ - run : sudo -u test_user cargo pgrx init
48+ - run : sudo -u test_user cargo build --verbose
49+ - run : sudo -u test_user cargo test --verbose
2050
2151
You can’t perform that action at this time.
0 commit comments