This is an automated email from the ASF dual-hosted git repository.

xuanwo pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-opendal.git


The following commit(s) were added to refs/heads/main by this push:
     new 90fc20652 ci: Add setup for php and ocaml in dev container (#2825)
90fc20652 is described below

commit 90fc206521f4b2333d751096289b2c87194c9a06
Author: Xuanwo <[email protected]>
AuthorDate: Wed Aug 9 13:57:58 2023 +0800

    ci: Add setup for php and ocaml in dev container (#2825)
    
    * ci: Add setup for php and ocaml
    
    Signed-off-by: Xuanwo <[email protected]>
    
    * pilish
    
    Signed-off-by: Xuanwo <[email protected]>
    
    * polish
    
    Signed-off-by: GitHub <[email protected]>
    
    ---------
    
    Signed-off-by: Xuanwo <[email protected]>
    Signed-off-by: GitHub <[email protected]>
---
 .devcontainer/post_create.sh | 33 +++++++++++++++++++++------------
 1 file changed, 21 insertions(+), 12 deletions(-)

diff --git a/.devcontainer/post_create.sh b/.devcontainer/post_create.sh
index e6e2856c7..1f9b84a1d 100644
--- a/.devcontainer/post_create.sh
+++ b/.devcontainer/post_create.sh
@@ -18,6 +18,9 @@
 
 set -e
 
+# Make sure trustdb has been created.
+sudo gpg --list-keys || true
+
 # Update apt repo
 sudo apt update
 
@@ -35,24 +38,30 @@ corepack prepare yarn@stable --activate
 # Setup for java binding
 sudo apt install -y default-jdk
 echo "export JAVA_HOME=$(readlink -f /usr/bin/java | sed "s:/bin/java::")" | 
sudo tee /etc/profile.d/java_home.sh
-sudo ln -s /usr/lib/jvm/default-java /usr/lib/jvm/default
+sudo ln -s /usr/lib/jvm/default-java /usr/lib/jvm/default || true
 
 # Setup for C binding
 sudo apt install -y libgtest-dev cmake
-cd /usr/src/gtest
-sudo cmake CMakeLists.txt
-sudo make
-sudo cp lib/*.a /usr/lib
-sudo ln -s /usr/lib/libgtest.a /usr/local/lib/libgtest.a
-sudo ln -s /usr/lib/libgtest_main.a /usr/local/lib/libgtest_main.a
 
 # Setup for Zig binding
 sudo apt install -y wget
-wget -q 
https://github.com/marler8997/zigup/releases/download/v2022_08_25/zigup.ubuntu-latest-x86_64.zip
-unzip zigup.ubuntu-latest-x86_64.zip -d /usr/bin
-chmod +x /usr/bin/zigup
-zigup master #TODO: replace to 0.11.0 (stable)
+wget -q 
https://github.com/marler8997/zigup/releases/download/v2023_07_27/zigup.ubuntu-latest-x86_64.zip
+sudo unzip -o zigup.ubuntu-latest-x86_64.zip -d /usr/bin
+sudo chmod +x /usr/bin/zigup
+sudo zigup 0.11.0
 
 # Setup for Haskell binding
 sudo apt install -y ghc cabal-install
-cabal update
\ No newline at end of file
+cabal update
+
+# Setup for PHP binding
+sudo apt install software-properties-common
+echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | sudo tee 
/etc/apt/sources.list.d/sury-php.list
+wget -qO - https://packages.sury.org/php/apt.gpg | sudo apt-key add -
+sudo apt update -y
+sudo apt install -y php8.2 php8.2-dev
+
+# Setup for OCaml binding
+sudo apt install -y opam
+opam init --auto-setup --yes
+opam install -y dune ounit2 ocamlformat

Reply via email to