mirror of
https://github.com/msojocs/wx-compiler.git
synced 2025-07-19 00:00:04 +08:00
feat: docker
This commit is contained in:
parent
2db605d015
commit
ee8feb2248
9
.github/workflows/release.yml
vendored
9
.github/workflows/release.yml
vendored
@ -51,11 +51,14 @@ jobs:
|
|||||||
echo "::set-output name=tag::$tag"
|
echo "::set-output name=tag::$tag"
|
||||||
echo "::set-output name=name::$name"
|
echo "::set-output name=name::$name"
|
||||||
|
|
||||||
- name: Configure the project
|
# - name: Configure the project
|
||||||
uses: threeal/cmake-action@v1.3.0
|
# uses: threeal/cmake-action@v1.3.0
|
||||||
|
|
||||||
|
# - name: Build the project
|
||||||
|
# run: cmake --build build
|
||||||
|
|
||||||
- name: Build the project
|
- name: Build the project
|
||||||
run: cmake --build build
|
run: docker-compose up
|
||||||
|
|
||||||
- name: Upload prepare
|
- name: Upload prepare
|
||||||
run: |
|
run: |
|
||||||
|
18
docker-compose.yml
Normal file
18
docker-compose.yml
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
version: "3"
|
||||||
|
services:
|
||||||
|
wechat_devtools:
|
||||||
|
image: jiyecafe/wechat-devtools-build:v3
|
||||||
|
# build:
|
||||||
|
# context: ./docker
|
||||||
|
# dockerfile: Dockerfile
|
||||||
|
volumes:
|
||||||
|
- .:/workspace
|
||||||
|
environment:
|
||||||
|
# - ACTION_MODE=${ACTION_MODE:-false}
|
||||||
|
# - https_proxy=${https_proxy:-}
|
||||||
|
- WINE=${WINE:-false}
|
||||||
|
- LOCAL_USER_ID=${DOCKER_UID:-1000}
|
||||||
|
- LOCAL_GROUP_ID=${DOCKER_GID:-1000}
|
||||||
|
# - BUILD_VERSION=${BUILD_VERSION:-v0}
|
||||||
|
entrypoint: /workspace/docker/docker-entrypoint
|
||||||
|
userns_mode: "host"
|
46
docker/docker-entrypoint
Executable file
46
docker/docker-entrypoint
Executable file
@ -0,0 +1,46 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep GLIBC
|
||||||
|
echo "----"
|
||||||
|
strings /lib/x86_64-linux-gnu/libc.so.6 | grep GLIBC_
|
||||||
|
|
||||||
|
notice() {
|
||||||
|
echo -e "\033[36m $1 \033[0m "
|
||||||
|
}
|
||||||
|
|
||||||
|
rm -rf /tmp/vscode-ripgrep-cache-1.13.2/ripgrep-v13.0.0-4-x86_64-unknown-linux-musl.tar.gz
|
||||||
|
|
||||||
|
if [ "$(id -u)" -eq '0' ];then
|
||||||
|
USER_ID=${LOCAL_USER_ID:-1000}
|
||||||
|
GROUP_ID=${LOCAL_GROUP_ID:-1000}
|
||||||
|
notice "$USER_ID, $GROUP_ID"
|
||||||
|
usermod -u ${USER_ID} -g ${GROUP_ID} user > /dev/null 2>&1
|
||||||
|
chown -R ${USER_ID}:${GROUP_ID} /workspace > /dev/null 2>&1
|
||||||
|
# apt install software-properties-common -y
|
||||||
|
# add-apt-repository ppa:ubuntu-toolchain-r/test
|
||||||
|
# apt update
|
||||||
|
# apt install gcc-6 g++-6 -y
|
||||||
|
# cd /usr/bin
|
||||||
|
# rm gcc g++
|
||||||
|
# ln -s ./gcc-6 gcc
|
||||||
|
# ln -s ./g++-6 g++
|
||||||
|
# ls -l
|
||||||
|
# cat /etc/passwd
|
||||||
|
apt install cmake -y
|
||||||
|
gcc --version
|
||||||
|
g++ --version
|
||||||
|
cmake --verion
|
||||||
|
cd /workspace
|
||||||
|
rm -rf ./build
|
||||||
|
mkdir build
|
||||||
|
cd build
|
||||||
|
cmake ..
|
||||||
|
cmake --build . --config Release --target wcc
|
||||||
|
cmake --build . --config Release --target wcsc
|
||||||
|
readelf -s ./wcc | grep -oP "GLIBC.*" | sort | uniq
|
||||||
|
readelf -s ./wcsc | grep -oP "GLIBC.*" | sort | uniq
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "nothing"
|
||||||
|
# exec /usr/local/bin/gosu user entrypoint
|
Loading…
x
Reference in New Issue
Block a user