@@ -2,23 +2,43 @@ name: Rust
22
33on :
44 push :
5- branches : [ "main" ]
5+ branches : ["main"]
66 pull_request :
7- branches : [ "main" ]
7+ branches : ["main"]
88
99env :
1010 CARGO_TERM_COLOR : always
1111
1212jobs :
1313 build :
14-
1514 runs-on : ubuntu-22.04
1615
1716 steps :
18- - uses : actions/checkout@v3
19- - name : wget and install .deb
20- run : wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-3/wkhtmltox_0.12.6.1-3.jammy_amd64.deb && sudo apt install ./wkhtmltox_0.12.6.1-3.jammy_amd64.deb && rm wkhtmltox_0.12.6.1-3.jammy_amd64.deb
21- - name : Build
22- run : cargo build --verbose
23- - name : Run tests
24- run : cargo test --verbose
17+ - uses : actions/checkout@v3
18+ - name : Install wkhtmltox .deb
19+ run : |
20+ sudo apt-get update
21+ sudo apt-get install -y build-essential pkg-config wget
22+ wget -O wkhtmltox.deb https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-3/wkhtmltox_0.12.6.1-3.jammy_amd64.deb
23+ sudo apt-get install -y ./wkhtmltox.deb
24+ rm wkhtmltox.deb
25+ - name : Make libwkhtmltox discoverable for the linker
26+ run : |
27+ if [ -f /usr/local/lib/libwkhtmltox.so.0 ] && [ ! -f /usr/local/lib/libwkhtmltox.so ]; then
28+ sudo ln -s /usr/local/lib/libwkhtmltox.so.0 /usr/local/lib/libwkhtmltox.so
29+ fi
30+ echo '/usr/local/lib' | sudo tee /etc/ld.so.conf.d/wkhtmltox.conf
31+ sudo ldconfig
32+ ls -l /usr/local/lib/libwkhtmltox*
33+ - name : Build
34+ env :
35+ RUSTFLAGS : " -C link-arg=-L/usr/local/lib"
36+ LIBRARY_PATH : " /usr/local/lib"
37+ PKG_CONFIG_PATH : " /usr/local/lib/pkgconfig"
38+ run : cargo build --verbose
39+ - name : Run tests
40+ env :
41+ RUSTFLAGS : " -C link-arg=-L/usr/local/lib"
42+ LIBRARY_PATH : " /usr/local/lib"
43+ PKG_CONFIG_PATH : " /usr/local/lib/pkgconfig"
44+ run : cargo test --verbose
0 commit comments