Unverified Commit 12e43a89 authored by Ivan Matkov's avatar Ivan Matkov Committed by GitHub

Update and align environments in Docker images and GitHub Actions (#1096)

Changes:
- Moved Windows docker image from compose repo
- Update JDK to 21 in all images
- Cleanup unused scripts/CI stages/etc
parent 3a457806
...@@ -4,14 +4,13 @@ name: CI ...@@ -4,14 +4,13 @@ name: CI
on: on:
push: push:
branches: [ master ] branches: [ master ]
# TODO: temporary for faster tests, restore!
pull_request: pull_request:
branches: [ master ] branches: [ master ]
workflow_dispatch: workflow_dispatch:
jobs: jobs:
macos: macOS:
runs-on: macos-13 runs-on: macos-13
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
...@@ -105,21 +104,24 @@ jobs: ...@@ -105,21 +104,24 @@ jobs:
retention-days: 5 retention-days: 5
tvOS: tvOS:
# TVOS requires macos 13
runs-on: macos-13 runs-on: macos-13
# Steps represent a sequence of tasks that will be executed as part of the job
steps: steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v3
- uses: actions/checkout@v2 name: 'Check out code'
- uses: actions/setup-java@v2
- uses: actions/setup-java@v3
name: 'Set up JDK 21'
with: with:
distribution: 'adopt' distribution: 'adopt'
java-version: '11' java-version: '21'
cache: 'gradle'
- shell: bash - shell: bash
run: | run: |
./gradlew --stacktrace --info -Pskiko.native.enabled=true -Pskiko.test.onci=true :skiko:tvosX64Test ./gradlew --stacktrace --info -Pskiko.native.enabled=true -Pskiko.test.onci=true :skiko:tvosX64Test
# tvosSimulatorArm64Test will build the binary but the tests will be skipped due to X64 host machine # tvosSimulatorArm64Test will build the binary but the tests will be skipped due to X64 host machine
./gradlew --stacktrace --info -Pskiko.native.enabled=true -Pskiko.test.onci=true :skiko:tvosSimulatorArm64Test ./gradlew --stacktrace --info -Pskiko.native.enabled=true -Pskiko.test.onci=true :skiko:tvosSimulatorArm64Test
- uses: actions/upload-artifact@v4 - uses: actions/upload-artifact@v4
if: always() if: always()
with: with:
...@@ -154,17 +156,11 @@ jobs: ...@@ -154,17 +156,11 @@ jobs:
env: env:
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }} ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
run: | run: |
# TODO: simplify installation of compilers.
sudo apt-get update -y sudo apt-get update -y
sudo apt-get install build-essential software-properties-common -y sudo apt-get install libglu1-mesa-dev libxrandr-dev libdbus-1-dev multistrap -y
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
sudo apt-get update -y
sudo apt-get install build-essential software-properties-common -y
sudo apt-get update
sudo apt-get install gcc-9 g++-9 -y sudo apt-get install gcc-9 g++-9 -y
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 60 --slave /usr/bin/g++ g++ /usr/bin/g++-9 sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 60 --slave /usr/bin/g++ g++ /usr/bin/g++-9
sudo update-alternatives --config gcc sudo update-alternatives --config gcc
sudo apt-get install ninja-build fontconfig libfontconfig1-dev libglu1-mesa-dev libxrandr-dev libdbus-1-dev zip multistrap xvfb -y
sudo apt-get install gcc-9-aarch64-linux-gnu g++-9-aarch64-linux-gnu -y sudo apt-get install gcc-9-aarch64-linux-gnu g++-9-aarch64-linux-gnu -y
sudo update-alternatives --install /usr/bin/aarch64-linux-gnu-gcc aarch64-linux-gnu-gcc /usr/bin/aarch64-linux-gnu-gcc-9 60 --slave /usr/bin/aarch64-linux-gnu-g++ aarch64-linux-gnu-g++ /usr/bin/aarch64-linux-gnu-g++-9 sudo update-alternatives --install /usr/bin/aarch64-linux-gnu-gcc aarch64-linux-gnu-gcc /usr/bin/aarch64-linux-gnu-gcc-9 60 --slave /usr/bin/aarch64-linux-gnu-g++ aarch64-linux-gnu-g++ /usr/bin/aarch64-linux-gnu-g++-9
sudo update-alternatives --config aarch64-linux-gnu-gcc sudo update-alternatives --config aarch64-linux-gnu-gcc
...@@ -236,18 +232,12 @@ jobs: ...@@ -236,18 +232,12 @@ jobs:
- shell: bash - shell: bash
name: 'Set up Linux build environment' name: 'Set up Linux build environment'
run: | run: |
# TODO: simplify installation of compilers.
sudo apt-get update -y
sudo apt-get install build-essential software-properties-common -y
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
sudo apt-get update -y sudo apt-get update -y
sudo apt-get install build-essential software-properties-common -y sudo apt-get install libglu1-mesa-dev libxrandr-dev libdbus-1-dev -y
sudo apt-get update
sudo apt-get install clang-11 -y sudo apt-get install clang-11 -y
sudo apt-get remove g++ -y sudo apt-get remove g++ -y
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-11 100 sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-11 100
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-11 100 sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-11 100
sudo apt-get install ninja-build fontconfig libfontconfig1-dev libglu1-mesa-dev libxrandr-dev libdbus-1-dev zip xvfb -y
sudo Xvfb :0 -screen 0 1280x720x24 & sudo Xvfb :0 -screen 0 1280x720x24 &
- shell: bash - shell: bash
......
...@@ -18,26 +18,20 @@ jobs: ...@@ -18,26 +18,20 @@ jobs:
name: 'Check out code' name: 'Check out code'
- uses: actions/setup-java@v3 - uses: actions/setup-java@v3
name: 'Set up JDK 11' name: 'Set up JDK 21'
with: with:
distribution: 'adopt' distribution: 'adopt'
java-version: '11' java-version: '21'
cache: 'gradle' cache: 'gradle'
- shell: bash - shell: bash
name: 'Set up Linux build environment' name: 'Set up Linux build environment'
run: | run: |
# TODO: simplify installation of compilers.
sudo apt-get update -y sudo apt-get update -y
sudo apt-get install build-essential software-properties-common -y sudo apt-get install libglu1-mesa-dev libxrandr-dev libdbus-1-dev multistrap -y
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
sudo apt-get update -y
sudo apt-get install build-essential software-properties-common -y
sudo apt-get update
sudo apt-get install gcc-9 g++-9 -y sudo apt-get install gcc-9 g++-9 -y
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 60 --slave /usr/bin/g++ g++ /usr/bin/g++-9 sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 60 --slave /usr/bin/g++ g++ /usr/bin/g++-9
sudo update-alternatives --config gcc sudo update-alternatives --config gcc
sudo apt-get install ninja-build fontconfig libfontconfig1-dev libglu1-mesa-dev libxrandr-dev libdbus-1-dev zip multistrap xvfb -y
sudo apt-get install gcc-9-aarch64-linux-gnu g++-9-aarch64-linux-gnu -y sudo apt-get install gcc-9-aarch64-linux-gnu g++-9-aarch64-linux-gnu -y
sudo update-alternatives --install /usr/bin/aarch64-linux-gnu-gcc aarch64-linux-gnu-gcc /usr/bin/aarch64-linux-gnu-gcc-9 60 --slave /usr/bin/aarch64-linux-gnu-g++ aarch64-linux-gnu-g++ /usr/bin/aarch64-linux-gnu-g++-9 sudo update-alternatives --install /usr/bin/aarch64-linux-gnu-gcc aarch64-linux-gnu-gcc /usr/bin/aarch64-linux-gnu-gcc-9 60 --slave /usr/bin/aarch64-linux-gnu-g++ aarch64-linux-gnu-g++ /usr/bin/aarch64-linux-gnu-g++-9
sudo update-alternatives --config aarch64-linux-gnu-gcc sudo update-alternatives --config aarch64-linux-gnu-gcc
......
...@@ -3,9 +3,9 @@ name: WebTarget ...@@ -3,9 +3,9 @@ name: WebTarget
on: on:
# Triggers the workflow on push or pull request events but only for the master branch # Triggers the workflow on push or pull request events but only for the master branch
push: push:
branches: [ wasm-main, master ] branches: [ master ]
pull_request: pull_request:
branches: [ wasm-main, master ] branches: [ master ]
# Allows you to run this workflow manually from the Actions tab # Allows you to run this workflow manually from the Actions tab
workflow_dispatch: workflow_dispatch:
...@@ -19,16 +19,22 @@ jobs: ...@@ -19,16 +19,22 @@ jobs:
with: with:
chrome-version: stable chrome-version: stable
id: setup-chrome id: setup-chrome
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- uses: actions/setup-java@v2
- uses: actions/setup-java@v3
name: 'Set up JDK 21'
with: with:
distribution: 'adopt' distribution: 'adopt'
java-version: '11' java-version: '21'
- name: Install dependencies cache: 'gradle'
- name: 'Install dependencies'
run: | run: |
sudo apt-get update sudo apt-get update
sudo apt-get install libdbus-1-dev sudo apt-get install libdbus-1-dev
- name: 'install emsdk'
- name: 'Install emscripten'
shell: bash shell: bash
run: | run: |
cd ./skiko cd ./skiko
...@@ -43,23 +49,25 @@ jobs: ...@@ -43,23 +49,25 @@ jobs:
git clone https://github.com/emscripten-core/emsdk.git git clone https://github.com/emscripten-core/emsdk.git
cd ./emsdk cd ./emsdk
fi fi
./emsdk install 3.1.49 ./emsdk install 3.1.50
./emsdk activate 3.1.49 ./emsdk activate 3.1.50
source ./emsdk_env.sh source ./emsdk_env.sh
cd ..
- name: 'run k/wasm tests' - name: 'Run WASM tests'
shell: bash shell: bash
run: | run: |
cd ./skiko cd ./skiko
source ./emsdk/emsdk_env.sh source ./emsdk/emsdk_env.sh
./gradlew --stacktrace --info -Pskiko.wasm.enabled=true -Pskiko.js.enabled=true -Pskiko.test.onci=true wasmJsTest ./gradlew --stacktrace --info -Pskiko.wasm.enabled=true -Pskiko.js.enabled=true -Pskiko.test.onci=true wasmJsTest
./gradlew --stacktrace --info -Pskiko.wasm.enabled=true -Pskiko.js.enabled=true publishSkikoWasmRuntimePublicationToMavenLocal ./gradlew --stacktrace --info -Pskiko.wasm.enabled=true -Pskiko.js.enabled=true publishSkikoWasmRuntimePublicationToMavenLocal
- name: 'run k/js tests'
- name: 'Run JS tests'
shell: bash shell: bash
run: | run: |
cd ./skiko cd ./skiko
source ./emsdk/emsdk_env.sh source ./emsdk/emsdk_env.sh
./gradlew --stacktrace --info -Pskiko.wasm.enabled=true -Pskiko.js.enabled=true -Pskiko.test.onci=true jsTest ./gradlew --stacktrace --info -Pskiko.wasm.enabled=true -Pskiko.js.enabled=true -Pskiko.test.onci=true jsTest
- uses: actions/upload-artifact@v4 - uses: actions/upload-artifact@v4
if: always() if: always()
with: with:
......
FROM ubuntu:20.04 FROM ubuntu:20.04
ARG DEBIAN_FRONTEND=noninteractive ARG DEBIAN_FRONTEND=noninteractive
# Update binutils, g++, gcc
RUN apt-get update -y && \ RUN apt-get update -y && \
apt-get install build-essential software-properties-common -y && \ apt-get install binutils build-essential software-properties-common -y && \
add-apt-repository ppa:ubuntu-toolchain-r/test -y && \ apt-get install zip unzip git python curl wget -y && \
apt-get update -y && \ apt-get install fontconfig libfontconfig1-dev libglu1-mesa-dev libxrandr-dev libdbus-1-dev multistrap -y && \
apt-get install binutils && \ apt-get install openjdk-21-jdk -y && \
apt-get install build-essential software-properties-common -y && \
apt-get update && \
apt-get install gcc-9 g++-9 -y && \ apt-get install gcc-9 g++-9 -y && \
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 60 --slave /usr/bin/g++ g++ /usr/bin/g++-9 && \ update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 60 --slave /usr/bin/g++ g++ /usr/bin/g++-9 && \
update-alternatives --config gcc && \ update-alternatives --config gcc && \
apt-get install gcc-9-aarch64-linux-gnu g++-9-aarch64-linux-gnu -y && \ apt-get install gcc-9-aarch64-linux-gnu g++-9-aarch64-linux-gnu -y && \
update-alternatives --install /usr/bin/aarch64-linux-gnu-gcc aarch64-linux-gnu-gcc /usr/bin/aarch64-linux-gnu-gcc-9 60 --slave /usr/bin/aarch64-linux-gnu-g++ aarch64-linux-gnu-g++ /usr/bin/aarch64-linux-gnu-g++-9 && \ update-alternatives --install /usr/bin/aarch64-linux-gnu-gcc aarch64-linux-gnu-gcc /usr/bin/aarch64-linux-gnu-gcc-9 60 --slave /usr/bin/aarch64-linux-gnu-g++ aarch64-linux-gnu-g++ /usr/bin/aarch64-linux-gnu-g++-9 && \
update-alternatives --config aarch64-linux-gnu-gcc update-alternatives --config aarch64-linux-gnu-gcc && \
rm -rf /var/lib/apt/lists/*
# Install libs & tools # Install chromium tools
ENV DEPOT_TOOLS=/usr/depot_tools ENV DEPOT_TOOLS=/usr/depot_tools
ENV PATH=$DEPOT_TOOLS:$PATH ENV PATH=$DEPOT_TOOLS:$PATH
RUN apt-get install git python wget -y && \ RUN git clone 'https://chromium.googlesource.com/chromium/tools/depot_tools.git' $DEPOT_TOOLS
apt-get install fontconfig libfontconfig1-dev libglu1-mesa-dev libxrandr-dev libdbus-1-dev curl zip multistrap -y && \
git clone 'https://chromium.googlesource.com/chromium/tools/depot_tools.git' $DEPOT_TOOLS
# Install Java # Use UTF-8 by default
ENV JAVA_HOME=/usr/java/11
ENV PATH=$JAVA_HOME/bin:$PATH
RUN JAVA_URL=https://corretto.aws/downloads/latest/amazon-corretto-11-x64-linux-jdk.tar.gz && \
JAVA_ARCHIVE=/tmp/jdk.tar.gz && \
JAVA_BASE=/usr/java/ && \
wget $JAVA_URL --output-document $JAVA_ARCHIVE && \
mkdir -p $JAVA_BASE && \
tar -xzf $JAVA_ARCHIVE --directory $JAVA_BASE && \
find $JAVA_BASE -type d -maxdepth 1 -name "amazon-corretto-11*linux-x64" -exec mv {} $JAVA_HOME \; && \
rm $JAVA_ARCHIVE
ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8
ENV JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF ENV JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF
\ No newline at end of file
docker build -t skiko-build .
docker run --rm --mount type=bind,source=$HOME/compose,target=/host -ti skiko-build bash -c "cd /host/skiko/skiko && ./gradlew skikoJvmRuntimeJar && bash"
FROM ubuntu:focal FROM ubuntu:20.04
SHELL ["/bin/bash", "-c", "-l"]
ARG DEBIAN_FRONTEND=noninteractive ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update -y && \ RUN apt-get update -y && \
apt-get install binutils build-essential software-properties-common -y && \ apt-get install binutils build-essential software-properties-common -y && \
apt-get install git curl wget unzip -y && \ apt-get install zip unzip git python curl wget -y && \
apt-get install python -y && \ apt-get install fontconfig libfontconfig1-dev libglu1-mesa-dev libxrandr-dev libdbus-1-dev -y && \
apt-get install pkg-config libdbus-1-dev -y && \ apt-get install openjdk-21-jdk -y && \
apt-get install openjdk-11-jdk -y && \
rm -rf /var/lib/apt/lists/* rm -rf /var/lib/apt/lists/*
# Install Android SDK
ENV ANDROID_SDK_ROOT=/android/sdk ENV ANDROID_SDK_ROOT=/android/sdk
ARG CMD_TOOLS_VERSION=6858069 ARG CMD_TOOLS_VERSION=13114758
ARG CMD_TOOLS_ROOT=$ANDROID_SDK_ROOT/cmdline-tools/$CMD_TOOLS_VERSION ARG CMD_TOOLS_ROOT=$ANDROID_SDK_ROOT/cmdline-tools/$CMD_TOOLS_VERSION
ARG SDK_MANAGER=$CMD_TOOLS_ROOT/bin/sdkmanager ARG SDK_MANAGER=$CMD_TOOLS_ROOT/bin/sdkmanager
RUN mkdir -p $CMD_TOOLS_ROOT && \ RUN mkdir -p $CMD_TOOLS_ROOT && \
...@@ -18,7 +19,7 @@ RUN mkdir -p $CMD_TOOLS_ROOT && \ ...@@ -18,7 +19,7 @@ RUN mkdir -p $CMD_TOOLS_ROOT && \
unzip cmd-tools.zip && \ unzip cmd-tools.zip && \
rm cmd-tools.zip && \ rm cmd-tools.zip && \
mv cmdline-tools/* $CMD_TOOLS_ROOT/ mv cmdline-tools/* $CMD_TOOLS_ROOT/
ARG ANDROID_PLATFORM=android-28 ARG ANDROID_PLATFORM=android-33
RUN yes | $SDK_MANAGER --licenses && \ RUN yes | $SDK_MANAGER --licenses && \
$SDK_MANAGER "platforms;$ANDROID_PLATFORM" && \ $SDK_MANAGER "platforms;$ANDROID_PLATFORM" && \
cd $ANDROID_SDK_ROOT/platforms/$ANDROID_PLATFORM && \ cd $ANDROID_SDK_ROOT/platforms/$ANDROID_PLATFORM && \
...@@ -27,5 +28,7 @@ ARG NDK_VERSION=21.4.7075529 ...@@ -27,5 +28,7 @@ ARG NDK_VERSION=21.4.7075529
RUN $SDK_MANAGER "ndk;$NDK_VERSION" && \ RUN $SDK_MANAGER "ndk;$NDK_VERSION" && \
cd $ANDROID_SDK_ROOT/ndk/$NDK_VERSION && \ cd $ANDROID_SDK_ROOT/ndk/$NDK_VERSION && \
ls -1 | grep -v toolchains | xargs rm -rf ls -1 | grep -v toolchains | xargs rm -rf
# Use UTF-8 by default
ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8
ENV JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF ENV JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF
CD=$(dirname "$0")
IMAGE_NAME=$(sh $CD/image-name.sh)
docker build -t $IMAGE_NAME $CD
\ No newline at end of file
echo skiko-build-android-ubuntu-2004-amd64:latest
\ No newline at end of file
CD=$(dirname "$0")
IMAGE_NAME=$(sh $CD/image-name.sh)
SKIKO_ROOT_LOCAL=$(cd $CD/../.. && pwd)
docker run \
--cpus 2 \
--memory 4g \
--tty --interactive \
--volume $SKIKO_ROOT_LOCAL:/skiko \
--workdir /skiko \
$IMAGE_NAME \
bash
\ No newline at end of file
FROM arm64v8/ubuntu:20.04 FROM arm64v8/ubuntu:20.04
ARG DEBIAN_FRONTEND=noninteractive ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update -y
RUN apt-get install binutils build-essential -y RUN apt-get update -y && \
RUN apt-get install software-properties-common -y apt-get install binutils build-essential software-properties-common -y && \
RUN apt-get install python git fontconfig libfontconfig1-dev libglu1-mesa-dev libxrandr-dev libdbus-1-dev curl wget -y apt-get install zip unzip git python curl wget -y && \
RUN apt-get install openjdk-11-jdk -y apt-get install fontconfig libfontconfig1-dev libglu1-mesa-dev libxrandr-dev libdbus-1-dev -y && \
RUN apt-get install clang-11 -y && \ apt-get install openjdk-21-jdk -y && \
apt-get install clang-11 -y && \
apt-get remove g++ -y && \ apt-get remove g++ -y && \
update-alternatives --install /usr/bin/clang clang /usr/bin/clang-11 100 && \ update-alternatives --install /usr/bin/clang clang /usr/bin/clang-11 100 && \
update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-11 100 update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-11 100 && \
RUN apt-get install nodejs -y rm -rf /var/lib/apt/lists/*
# Install libs & tools # Install chromium tools
ENV DEPOT_TOOLS=/usr/depot_tools ENV DEPOT_TOOLS=/usr/depot_tools
ENV PATH=$DEPOT_TOOLS:$PATH ENV PATH=$DEPOT_TOOLS:$PATH
RUN git clone 'https://chromium.googlesource.com/chromium/tools/depot_tools.git' $DEPOT_TOOLS RUN git clone 'https://chromium.googlesource.com/chromium/tools/depot_tools.git' $DEPOT_TOOLS
......
CD=$(dirname "$0")
IMAGE_NAME=$(sh $CD/image-name.sh)
docker build -t $IMAGE_NAME $CD
\ No newline at end of file
echo skiko-build-ubuntu-2004-aarch64:latest
\ No newline at end of file
CD=$(dirname "$0")
IMAGE_NAME=$(sh $CD/image-name.sh)
SKIKO_ROOT_LOCAL=$(cd $CD/../.. && pwd)
docker run \
--cpus 1 \
--memory 4g \
--tty --interactive \
--volume $SKIKO_ROOT_LOCAL:/skiko \
--workdir /skiko \
$IMAGE_NAME \
bash
\ No newline at end of file
FROM ubuntu:focal-20211006 FROM ubuntu:20.04
SHELL ["/bin/bash", "-c", "-l"]
ARG DEBIAN_FRONTEND=noninteractive ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update -y && \ RUN apt-get update -y && \
apt-get install binutils build-essential software-properties-common -y && \ apt-get install binutils build-essential software-properties-common -y && \
apt-get install git curl wget -y && \ apt-get install zip unzip git python curl wget -y && \
apt-get install python -y && \ apt-get install fontconfig libfontconfig1-dev libglu1-mesa-dev libxrandr-dev libdbus-1-dev -y && \
apt-get install openjdk-11-jdk -y apt-get install openjdk-21-jdk -y && \
# Install libs & tools rm -rf /var/lib/apt/lists/*
RUN apt-get install git python wget -y && \
apt-get install fontconfig libfontconfig1-dev libglu1-mesa-dev libxrandr-dev libdbus-1-dev curl zip -y # Install emscripten
ENV EMSDK_DIR=/usr/emsdk ENV EMSDK_DIR=/usr/emsdk
ENV EMSDK_VER=3.1.50 ENV EMSDK_VER=3.1.50
ENV PATH=$EMSDK_DIR/upstream/emscripten:$PATH
RUN git clone https://github.com/emscripten-core/emsdk.git $EMSDK_DIR && \ RUN git clone https://github.com/emscripten-core/emsdk.git $EMSDK_DIR && \
$EMSDK_DIR/emsdk install $EMSDK_VER && \ $EMSDK_DIR/emsdk install $EMSDK_VER && \
$EMSDK_DIR/emsdk activate $EMSDK_VER $EMSDK_DIR/emsdk activate $EMSDK_VER
ENV PATH=$EMSDK_DIR/upstream/emscripten:$PATH
# Use UTF-8 by default
ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8
ENV JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF ENV JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF
docker build -t skiko-build-emscripten-ubuntu-2004-amd64:latest .
\ No newline at end of file
# escape=`
# Use the latest Windows Server Core 2022 image.
FROM mcr.microsoft.com/windows/servercore:ltsc2022
# Restore the default Windows shell for correct batch processing.
SHELL ["cmd", "/S", "/C"]
# Download BuildTools installer
ADD https://aka.ms/vs/17/release/vs_buildtools.exe C:\Temp\vs_buildtools.exe
# Download channel for fixed install.
ADD https://aka.ms/vs/17/release/channel C:\Temp\VisualStudio.chman
# Install MSVC C++ compiler, CMake, and MSBuild.
RUN `
# Install Build Tools excluding workloads and components with known issues.
start /w C:\Temp\vs_buildtools.exe --quiet --wait --norestart --nocache `
--installPath "C:\BuildTools" `
--channelUri C:\Temp\VisualStudio.chman `
--installChannelUri C:\Temp\VisualStudio.chman `
--add Microsoft.VisualStudio.Workload.VCTools;includeRecommended `
--add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 `
--add Microsoft.VisualStudio.Component.VC.Tools.ARM64 `
--add Microsoft.Component.MSBuild `
--remove Microsoft.VisualStudio.Component.Windows10SDK.10240 `
--remove Microsoft.VisualStudio.Component.Windows10SDK.10586 `
--remove Microsoft.VisualStudio.Component.Windows10SDK.14393 `
--remove Microsoft.VisualStudio.Component.Windows81SDK `
|| IF "%ERRORLEVEL%"=="3010" EXIT 0
RUN setx /M SKIKO_VSBT_PATH "C:\BuildTools"
ADD https://github.com/llvm/llvm-project/releases/download/llvmorg-20.1.7/LLVM-20.1.7-win64.exe C:\Temp\llvm.exe
RUN powershell Start-Process -Wait C:\Temp\llvm.exe -ArgumentList /S
RUN setx /M PATH "C:\Program Files\LLVM\bin;%PATH%"
# Install Java
COPY install_jdk.ps1 C:\TEMP\install_jdk.ps1
RUN powershell C:\TEMP\install_jdk.ps1 -url https://aka.ms/download-jdk/microsoft-jdk-21.0.8-windows-x64.zip -targetDir C:\jdk-21
RUN setx /M PATH "C:\jdk-21\bin;%PATH%"
RUN setx /M JAVA_HOME C:\jdk-21
ENV PYTHON_VERSION=2.7.18
ENV PYTHON_RELEASE=2.7.18
ADD install_python.ps1 C:\TEMP\install_python.ps1
RUN powershell C:\TEMP\install_python.ps1
COPY install_git.ps1 C:\TEMP\install_git.ps1
RUN powershell C:\TEMP\install_git.ps1
RUN setx /M PATH "C:\Git\cmd;C:\Git\bin;C:\Git\usr\bin;%PATH%"
RUN git.exe clone "https://chromium.googlesource.com/chromium/tools/depot_tools.git" "C:\depot_tools"
RUN setx /M PATH "C:\depot_tools;%PATH%"
# Define the entry point for the docker container.
# This entry point starts the developer command prompt and launches the PowerShell shell.
ENTRYPOINT ["C:\\BuildTools\\Common7\\Tools\\VsDevCmd.bat", "&&", "powershell.exe", "-NoLogo", "-ExecutionPolicy", "Bypass"]
# Install 7zip
Write-Host 'Downloading 7z...'
$7zinstaller='C:\TEMP\7zsetup.exe'
(New-Object System.Net.WebClient).DownloadFile('https://www.7-zip.org/a/7z1900-x64.exe', $7zinstaller)
Write-Host 'Installing 7z...'
Start-Process $7zinstaller -ArgumentList '/S' -Wait
Remove-Item $7zinstaller -Force
$env:Path += ';C:\Program Files\7-Zip\'
# Install Git
Write-Host 'Downloading Git...'
$gitarchive='C:\TEMP\portableGit.7z.exe'
(New-Object System.Net.WebClient).DownloadFile('https://github.com/git-for-windows/git/releases/download/v2.28.0.windows.1/PortableGit-2.28.0-64-bit.7z.exe', $gitarchive)
Write-Host 'Installing Git...'
7z.exe x $gitarchive -o'C:\Git'
Remove-Item $gitarchive -Force
param ($url, $targetDir)
$archiveFile="C:\TEMP\jdk.zip"
Write-Host ('Downloading {0} ...' -f $url)
(New-Object System.Net.WebClient).DownloadFile($url, $archiveFile)
Write-Host 'Installing ...'
tar -xf $archiveFile
# rename an unpacked directory like 'jdk-21.0.8+9' to '$targetDir'
$jdkDir=Get-ChildItem -Filter "jdk*"|Select-Object -First 1
Rename-Item -Path $jdkDir.FullName -NewName $targetDir
Remove-Item $archiveFile -Force
Write-Host 'Installation is complete.'
$url = ('https://www.python.org/ftp/python/{0}/python-{1}.amd64.msi' -f $env:PYTHON_RELEASE, $env:PYTHON_VERSION)
$installer='C:\TEMP\python.msi'
Write-Host ('Downloading {0} ...' -f $url)
(New-Object System.Net.WebClient).DownloadFile($url, $installer)
Write-Host 'Installing ...'
Start-Process msiexec -Wait -ArgumentList @('/i', $installer, '/quiet', '/qn', 'TARGETDIR=C:\Python', 'ALLUSERS=1', 'ADDLOCAL=DefaultFeature,Extensions,TclTk,Tools,PrependPath')
Remove-Item $installer -Force
Write-Host 'Python installation is complete.'
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment