File tree Expand file tree Collapse file tree 3 files changed +17
-13
lines changed Expand file tree Collapse file tree 3 files changed +17
-13
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ name: Build
33on : [push]
44
55env :
6- EXTENSION_NAME : yourproject
6+ EXTENSION_NAME : php_rocksdb_rc
77
88jobs :
99 linux :
7878
7979 - name : Build
8080 run : |
81- docker run -v ~/.cargo/registry:/root/.cargo/registry -v ~/.cargo/git:/root/.cargo/git --platform ${{ matrix.platform }} --rm -v $PWD:/code localhost:5000/php-build:latest bash -c " rustup target add ${{ matrix.target }} && cargo build --release --target ${{ matrix.target }}"
81+ docker run -v ~/.cargo/registry:/root/.cargo/registry -v ~/.cargo/git:/root/.cargo/git --platform ${{ matrix.platform }} --rm -v $PWD:/code localhost:5000/php-build:latest bash -c ' rustup target add ${{ matrix.target }} ; cargo build --release --target ${{ matrix.target }}'
8282
8383 - name : Rename file
8484 run : cp target/${{ matrix.target }}/release/lib${{ env.EXTENSION_NAME }}.so php${{ matrix.php-version }}-${{ matrix.target }}-${{ env.EXTENSION_NAME }}.so
Original file line number Diff line number Diff line change @@ -4,7 +4,6 @@ version = "0.1.0"
44edition = " 2021"
55
66[lib ]
7- name = " libphprocksdb"
87path = " src/lib.rs"
98crate-type = [" cdylib" ]
109
Original file line number Diff line number Diff line change 1- FROM php:8.1-zts-bullseye
1+ # Define versions used to select image versions
2+ # (ARGs declared before FROM can't be used outside of FROMs)
3+ ARG FROM_PHP=8.0
24
3- WORKDIR /tmp
5+ # Select distro
6+ ARG FROM_DISTRO=bullseye
47
5- RUN apt update -y && apt upgrade -y
6- RUN apt install lsb-release wget gnupg software-properties-common -y
7- RUN bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)"
8+ FROM php:${FROM_PHP}-fpm-${FROM_DISTRO}
89
9- ENV RUSTUP_HOME=/rust
10- ENV CARGO_HOME=/cargo
11- ENV PATH=/cargo/bin:/rust/bin:$PATH
10+ ENV CARGO_NET_GIT_FETCH_WITH_CLI=true
1211
13- RUN (curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain nightly --no-modify-path) && rustup default nightly
12+ RUN apt-get update && apt install curl build-essential gcc libclang-dev make openssl libssl-dev git -y
1413
15- ENTRYPOINT [ "/cargo/bin/cargo" , "build" , "--all" , "--release" ]
14+ RUN curl https://sh.rustup.rs -sSf | bash -s -- -y
15+
16+ RUN echo 'source $HOME/.cargo/env' >> $HOME/.bashrc
17+ ENV PATH="/root/.cargo/bin:${PATH}"
18+
19+ WORKDIR /code
20+ ENTRYPOINT [ "" ]
You can’t perform that action at this time.
0 commit comments