From 46858d12e296f1a3f4a6b545984163a6981029db Mon Sep 17 00:00:00 2001 From: kukkok3 <93382903+kukkok3@users.noreply.github.com> Date: Fri, 12 Apr 2024 13:33:03 +0200 Subject: [PATCH 1/7] feat: adds some logging --- catalyst_voices/Earthfile | 8 ++++++++ .../test_driver/scripts/install-chrome-linux64.sh | 6 +++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/catalyst_voices/Earthfile b/catalyst_voices/Earthfile index 309bfa50212..4ad84bd05b0 100644 --- a/catalyst_voices/Earthfile +++ b/catalyst_voices/Earthfile @@ -7,6 +7,14 @@ VERSION --try --global-cache --arg-scope-and-set 0.7 # subcommand. deps: FROM debian:bookworm-slim + ARG TARGETARCH + ARG TARGETOS + ARG NATIVEOS + ARG TARGETPLATFORM + RUN --no-cache echo "tarch "$TARGETARCH + RUN --no-cache echo "tos " $TARGETOS + RUN --no-cache echo "nos " $NATIVEOS + RUN --no-cache echo "tplatform " $TARGETPLATFORM RUN apt-get update RUN apt-get install -y git curl unzip bzip2 bash jq gpg COPY --dir test_driver/scripts . diff --git a/catalyst_voices/test_driver/scripts/install-chrome-linux64.sh b/catalyst_voices/test_driver/scripts/install-chrome-linux64.sh index af4aca22d57..6bff1669cc8 100644 --- a/catalyst_voices/test_driver/scripts/install-chrome-linux64.sh +++ b/catalyst_voices/test_driver/scripts/install-chrome-linux64.sh @@ -5,7 +5,7 @@ DISTR="Debian 12 (Bookworm)" # Installing dependencies for Chrome. Workaround for: # https://github.com/GoogleChromeLabs/chrome-for-testing/issues/55 -echo "Installing Google Chrome dependencies" +echo -e "\033[1;34mInstalling Google Chrome dependencies" chrome_deps=$(curl -s https://raw.githubusercontent.com/chromium/chromium/main/chrome/installer/linux/debian/dist_package_versions.json) deps=$(echo "$chrome_deps" | jq -r ".\"$DISTR\" | keys[]") apt-get update @@ -17,7 +17,7 @@ done json_chrome=$(curl -s https://googlechromelabs.github.io/chrome-for-testing/last-known-good-versions-with-downloads.json) # Install chrome -echo "Installing Google Chrome..." +echo -e "\033[1;34mInstalling Google Chrome..." latest_chrome=$(echo "$json_chrome" | jq -r ".channels.Stable.downloads.chrome[].url | select(contains(\"$PLATFORM\"))") curl -s --create-dirs -o chrome.zip --output-dir /opt/chrome "$latest_chrome" unzip -d /opt/chrome -j /opt/chrome/chrome.zip && rm /opt/chrome/chrome.zip @@ -26,7 +26,7 @@ chmod +x /opt/chrome/chrome google-chrome --version # Install chromedriver -echo "Installing Chromedriver..." +echo -e "\033[1;34mInstalling Chromedriver..." latest_chromedriver=$(echo "$json_chrome" | jq -r ".channels.Stable.downloads.chromedriver[].url | select(contains(\"$PLATFORM\"))") curl -s --create-dirs -o chromedriver.zip --output-dir /opt/chromedriver "$latest_chromedriver" unzip -d /opt/chromedriver -j /opt/chromedriver/chromedriver.zip && rm /opt/chromedriver/chromedriver.zip From 8cbf3e382ef20554273856889d432dc16aa75235 Mon Sep 17 00:00:00 2001 From: kukkok3 <93382903+kukkok3@users.noreply.github.com> Date: Mon, 15 Apr 2024 11:01:39 +0200 Subject: [PATCH 2/7] adds: more logs --- catalyst_voices/Earthfile | 11 ++--------- .../test_driver/scripts/install-chrome-linux64.sh | 11 +++++++++-- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/catalyst_voices/Earthfile b/catalyst_voices/Earthfile index 4ad84bd05b0..b440e81f453 100644 --- a/catalyst_voices/Earthfile +++ b/catalyst_voices/Earthfile @@ -8,19 +8,12 @@ VERSION --try --global-cache --arg-scope-and-set 0.7 deps: FROM debian:bookworm-slim ARG TARGETARCH - ARG TARGETOS - ARG NATIVEOS - ARG TARGETPLATFORM - RUN --no-cache echo "tarch "$TARGETARCH - RUN --no-cache echo "tos " $TARGETOS - RUN --no-cache echo "nos " $NATIVEOS - RUN --no-cache echo "tplatform " $TARGETPLATFORM RUN apt-get update RUN apt-get install -y git curl unzip bzip2 bash jq gpg COPY --dir test_driver/scripts . RUN chmod +x scripts/install-chrome-linux64.sh && ./scripts/install-chrome-linux64.sh - RUN chmod +x scripts/install-edge-linux64.sh && ./scripts/install-edge-linux64.sh - RUN chmod +x scripts/install-firefox-linux64.sh && ./scripts/install-firefox-linux64.sh + #RUN chmod +x scripts/install-edge-linux64.sh && ./scripts/install-edge-linux64.sh + #RUN chmod +x scripts/install-firefox-linux64.sh && ./scripts/install-firefox-linux64.sh WORKDIR /frontend diff --git a/catalyst_voices/test_driver/scripts/install-chrome-linux64.sh b/catalyst_voices/test_driver/scripts/install-chrome-linux64.sh index 6bff1669cc8..1b39a8ff7ec 100644 --- a/catalyst_voices/test_driver/scripts/install-chrome-linux64.sh +++ b/catalyst_voices/test_driver/scripts/install-chrome-linux64.sh @@ -1,11 +1,18 @@ #!/bin/bash # This script installs Chrome for testing and Chromedriver -PLATFORM=linux64 +echo "TARGET ARCHITECTURE $TARGETARCH" +if [ "$TARGETARCH" == "amd64" ] +then + PLATFORM=linux64 +else + PLATFORM=mac-arm64 +fi + DISTR="Debian 12 (Bookworm)" # Installing dependencies for Chrome. Workaround for: # https://github.com/GoogleChromeLabs/chrome-for-testing/issues/55 -echo -e "\033[1;34mInstalling Google Chrome dependencies" +echo -e "\033[1;34mInstalling Google Chrome dependencies for $PLATFORM" chrome_deps=$(curl -s https://raw.githubusercontent.com/chromium/chromium/main/chrome/installer/linux/debian/dist_package_versions.json) deps=$(echo "$chrome_deps" | jq -r ".\"$DISTR\" | keys[]") apt-get update From 148442801aa8843b0e575462f643ddc2a76d36a6 Mon Sep 17 00:00:00 2001 From: kukkok3 <93382903+kukkok3@users.noreply.github.com> Date: Tue, 16 Apr 2024 10:18:09 +0200 Subject: [PATCH 3/7] feat: adds browser install for arm64 --- catalyst_voices/Earthfile | 4 +- .../scripts/install-chrome-linux64.sh | 77 ++++++++++--------- .../scripts/install-edge-linux64.sh | 12 ++- .../scripts/install-firefox-linux64.sh | 12 ++- 4 files changed, 59 insertions(+), 46 deletions(-) diff --git a/catalyst_voices/Earthfile b/catalyst_voices/Earthfile index b440e81f453..38368bd78d1 100644 --- a/catalyst_voices/Earthfile +++ b/catalyst_voices/Earthfile @@ -12,8 +12,8 @@ deps: RUN apt-get install -y git curl unzip bzip2 bash jq gpg COPY --dir test_driver/scripts . RUN chmod +x scripts/install-chrome-linux64.sh && ./scripts/install-chrome-linux64.sh - #RUN chmod +x scripts/install-edge-linux64.sh && ./scripts/install-edge-linux64.sh - #RUN chmod +x scripts/install-firefox-linux64.sh && ./scripts/install-firefox-linux64.sh + RUN chmod +x scripts/install-edge-linux64.sh && ./scripts/install-edge-linux64.sh + RUN chmod +x scripts/install-firefox-linux64.sh && ./scripts/install-firefox-linux64.sh WORKDIR /frontend diff --git a/catalyst_voices/test_driver/scripts/install-chrome-linux64.sh b/catalyst_voices/test_driver/scripts/install-chrome-linux64.sh index 1b39a8ff7ec..4183b118361 100644 --- a/catalyst_voices/test_driver/scripts/install-chrome-linux64.sh +++ b/catalyst_voices/test_driver/scripts/install-chrome-linux64.sh @@ -1,42 +1,47 @@ #!/bin/bash -# This script installs Chrome for testing and Chromedriver -echo "TARGET ARCHITECTURE $TARGETARCH" -if [ "$TARGETARCH" == "amd64" ] +# This script installs Chrome/Chromium for testing and Chromedriver +if [ "$TARGETARCH" == "arm64"] + # There is no Chrome for testing for arm64, using chromium instead + # https://github.com/GoogleChromeLabs/chrome-for-testing/issues/1 then - PLATFORM=linux64 -else - PLATFORM=mac-arm64 -fi - -DISTR="Debian 12 (Bookworm)" + echo -e "\033[1;34mInstalling Chromium..." + apt-get update + apt-get install -y chromium + ln -s /usr/bin/chromium /usr/local/bin/google-chrome + google-chrome --version -# Installing dependencies for Chrome. Workaround for: -# https://github.com/GoogleChromeLabs/chrome-for-testing/issues/55 -echo -e "\033[1;34mInstalling Google Chrome dependencies for $PLATFORM" -chrome_deps=$(curl -s https://raw.githubusercontent.com/chromium/chromium/main/chrome/installer/linux/debian/dist_package_versions.json) -deps=$(echo "$chrome_deps" | jq -r ".\"$DISTR\" | keys[]") -apt-get update -for dep in $deps; do - apt-get install -y $dep -done + apt-get install chromium-driver + chromedriver --version +else + DISTR="Debian 12 (Bookworm)" + # Installing dependencies for Chrome. Workaround for: + # https://github.com/GoogleChromeLabs/chrome-for-testing/issues/55 + echo -e "\033[1;34mInstalling Google Chrome dependencies..." + chrome_deps=$(curl -s https://raw.githubusercontent.com/chromium/chromium/main/chrome/installer/linux/debian/dist_package_versions.json) + deps=$(echo "$chrome_deps" | jq -r ".\"$DISTR\" | keys[]") + apt-get update + for dep in $deps; do + apt-get install -y $dep + done -# Get latest chrome for testing version -json_chrome=$(curl -s https://googlechromelabs.github.io/chrome-for-testing/last-known-good-versions-with-downloads.json) + # Get latest chrome for testing version + json_chrome=$(curl -s https://googlechromelabs.github.io/chrome-for-testing/last-known-good-versions-with-downloads.json) -# Install chrome -echo -e "\033[1;34mInstalling Google Chrome..." -latest_chrome=$(echo "$json_chrome" | jq -r ".channels.Stable.downloads.chrome[].url | select(contains(\"$PLATFORM\"))") -curl -s --create-dirs -o chrome.zip --output-dir /opt/chrome "$latest_chrome" -unzip -d /opt/chrome -j /opt/chrome/chrome.zip && rm /opt/chrome/chrome.zip -ln -s /opt/chrome/chrome /usr/local/bin/google-chrome -chmod +x /opt/chrome/chrome -google-chrome --version + # Install chrome + echo -e "\033[1;34mInstalling Google Chrome..." + latest_chrome=$(echo "$json_chrome" | jq -r ".channels.Stable.downloads.chrome[].url | select(contains(\"linux64\"))") + curl -s --create-dirs -o chrome.zip --output-dir /opt/chrome "$latest_chrome" + unzip -d /opt/chrome -j /opt/chrome/chrome.zip && rm /opt/chrome/chrome.zip + ln -s /opt/chrome/chrome /usr/local/bin/google-chrome + chmod +x /opt/chrome/chrome + google-chrome --version -# Install chromedriver -echo -e "\033[1;34mInstalling Chromedriver..." -latest_chromedriver=$(echo "$json_chrome" | jq -r ".channels.Stable.downloads.chromedriver[].url | select(contains(\"$PLATFORM\"))") -curl -s --create-dirs -o chromedriver.zip --output-dir /opt/chromedriver "$latest_chromedriver" -unzip -d /opt/chromedriver -j /opt/chromedriver/chromedriver.zip && rm /opt/chromedriver/chromedriver.zip -ln -s /opt/chromedriver/chromedriver /usr/local/bin/chromedriver -chmod +x /opt/chromedriver/chromedriver -chromedriver --version + # Install chromedriver + echo -e "\033[1;34mInstalling Chromedriver..." + latest_chromedriver=$(echo "$json_chrome" | jq -r ".channels.Stable.downloads.chromedriver[].url | select(contains(\"linux64\"))") + curl -s --create-dirs -o chromedriver.zip --output-dir /opt/chromedriver "$latest_chromedriver" + unzip -d /opt/chromedriver -j /opt/chromedriver/chromedriver.zip && rm /opt/chromedriver/chromedriver.zip + ln -s /opt/chromedriver/chromedriver /usr/local/bin/chromedriver + chmod +x /opt/chromedriver/chromedriver + chromedriver --version +fi \ No newline at end of file diff --git a/catalyst_voices/test_driver/scripts/install-edge-linux64.sh b/catalyst_voices/test_driver/scripts/install-edge-linux64.sh index 3b2729aa4cf..b716f414d2a 100644 --- a/catalyst_voices/test_driver/scripts/install-edge-linux64.sh +++ b/catalyst_voices/test_driver/scripts/install-edge-linux64.sh @@ -1,15 +1,19 @@ #!/bin/bash # This script installs Edge and Edgedriver. -PLATFORM=linux64 - -echo "Installing Edge..." +if [ "$TARGETARCH" == "arm64"] +then + PLATFORM=arm64 +else + PLATFORM=linux64 +fi +echo -e "\033[1;34mInstalling Edge..." install -d -m 0755 /etc/apt/keyrings curl -fSsL https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor | tee /etc/apt/keyrings/microsoft-edge.gpg > /dev/null echo 'deb [signed-by=/etc/apt/keyrings/microsoft-edge.gpg] https://packages.microsoft.com/repos/edge stable main' | tee /etc/apt/sources.list.d/microsoft-edge.list apt-get update && apt-get install -y microsoft-edge-stable microsoft-edge-stable --version -echo "Installing Edgedriver..." +echo -e "\033[1;34mInstalling Edgedriver..." edge_version=$(microsoft-edge-stable --version | grep -Eo '[0-9]+.+' | tr -d ' ') curl -s --create-dirs -o msedgedriver.zip --output-dir /opt/msedgedriver "https://msedgedriver.azureedge.net/$edge_version/edgedriver_$PLATFORM.zip" unzip -d /opt/msedgedriver -j /opt/msedgedriver/msedgedriver.zip && rm /opt/msedgedriver/msedgedriver.zip diff --git a/catalyst_voices/test_driver/scripts/install-firefox-linux64.sh b/catalyst_voices/test_driver/scripts/install-firefox-linux64.sh index 1b2011c251b..e9eb67cde58 100644 --- a/catalyst_voices/test_driver/scripts/install-firefox-linux64.sh +++ b/catalyst_voices/test_driver/scripts/install-firefox-linux64.sh @@ -1,9 +1,13 @@ #!/bin/bash # This script installs Firefox and Geckodriver. Geckodriver supported versions: # https://firefox-source-docs.mozilla.org/testing/geckodriver/Support.html -PLATFORM=linux64 - -echo "Installing Firefox..." +if [ "$TARGETARCH" == "arm64"] +then + PLATFORM=aarch64 +else + PLATFORM=linux64 +fi +echo -e "\033[1;34mInstalling Firefox..." install -d -m 0755 /etc/apt/keyrings curl -fSsL https://packages.mozilla.org/apt/repo-signing-key.gpg | tee /etc/apt/keyrings/packages.mozilla.org.asc > /dev/null echo "deb [signed-by=/etc/apt/keyrings/packages.mozilla.org.asc] https://packages.mozilla.org/apt mozilla main" | tee -a /etc/apt/sources.list.d/mozilla.list > /dev/null @@ -15,7 +19,7 @@ Pin-Priority: 1000 apt-get update && apt-get install -y firefox firefox --version -echo "Installing Geckodriver..." +echo -e "\033[1;34mInstalling Geckodriver..." json_geckodriver=$(curl -s https://api.github.com/repos/mozilla/geckodriver/releases/latest) latest_geckodriver=$(echo "$json_geckodriver" | jq -r ".assets[].browser_download_url | select(contains(\"$PLATFORM\") and endswith(\"gz\"))") curl -sL --create-dirs -o geckodriver.tar.gz --output-dir /opt/geckodriver "$latest_geckodriver" From 3bbbe91a9055f898ad910a592e66f040f7a07b89 Mon Sep 17 00:00:00 2001 From: kukkok3 <93382903+kukkok3@users.noreply.github.com> Date: Tue, 16 Apr 2024 10:41:40 +0200 Subject: [PATCH 4/7] fix: if cond --- catalyst_voices/test_driver/scripts/install-chrome-linux64.sh | 2 +- catalyst_voices/test_driver/scripts/install-edge-linux64.sh | 2 +- catalyst_voices/test_driver/scripts/install-firefox-linux64.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/catalyst_voices/test_driver/scripts/install-chrome-linux64.sh b/catalyst_voices/test_driver/scripts/install-chrome-linux64.sh index 4183b118361..34e18af7b83 100644 --- a/catalyst_voices/test_driver/scripts/install-chrome-linux64.sh +++ b/catalyst_voices/test_driver/scripts/install-chrome-linux64.sh @@ -1,6 +1,6 @@ #!/bin/bash # This script installs Chrome/Chromium for testing and Chromedriver -if [ "$TARGETARCH" == "arm64"] +if [ "$TARGETARCH" == "arm64" ] # There is no Chrome for testing for arm64, using chromium instead # https://github.com/GoogleChromeLabs/chrome-for-testing/issues/1 then diff --git a/catalyst_voices/test_driver/scripts/install-edge-linux64.sh b/catalyst_voices/test_driver/scripts/install-edge-linux64.sh index b716f414d2a..d2c215a8bf5 100644 --- a/catalyst_voices/test_driver/scripts/install-edge-linux64.sh +++ b/catalyst_voices/test_driver/scripts/install-edge-linux64.sh @@ -1,6 +1,6 @@ #!/bin/bash # This script installs Edge and Edgedriver. -if [ "$TARGETARCH" == "arm64"] +if [ "$TARGETARCH" == "arm64" ] then PLATFORM=arm64 else diff --git a/catalyst_voices/test_driver/scripts/install-firefox-linux64.sh b/catalyst_voices/test_driver/scripts/install-firefox-linux64.sh index e9eb67cde58..523123f468c 100644 --- a/catalyst_voices/test_driver/scripts/install-firefox-linux64.sh +++ b/catalyst_voices/test_driver/scripts/install-firefox-linux64.sh @@ -1,7 +1,7 @@ #!/bin/bash # This script installs Firefox and Geckodriver. Geckodriver supported versions: # https://firefox-source-docs.mozilla.org/testing/geckodriver/Support.html -if [ "$TARGETARCH" == "arm64"] +if [ "$TARGETARCH" == "arm64" ] then PLATFORM=aarch64 else From 5ba2b700af7854765923306f521458aa73953178 Mon Sep 17 00:00:00 2001 From: kukkok3 <93382903+kukkok3@users.noreply.github.com> Date: Tue, 16 Apr 2024 13:07:26 +0200 Subject: [PATCH 5/7] feat: updates scripts --- .../scripts/install-chrome-linux64.sh | 35 +++++++++-------- .../scripts/install-edge-linux64.sh | 36 +++++++++--------- .../scripts/install-firefox-linux64.sh | 38 +++++++++++-------- 3 files changed, 57 insertions(+), 52 deletions(-) diff --git a/catalyst_voices/test_driver/scripts/install-chrome-linux64.sh b/catalyst_voices/test_driver/scripts/install-chrome-linux64.sh index 34e18af7b83..bdbb6cbc067 100644 --- a/catalyst_voices/test_driver/scripts/install-chrome-linux64.sh +++ b/catalyst_voices/test_driver/scripts/install-chrome-linux64.sh @@ -1,18 +1,10 @@ #!/bin/bash # This script installs Chrome/Chromium for testing and Chromedriver -if [ "$TARGETARCH" == "arm64" ] - # There is no Chrome for testing for arm64, using chromium instead - # https://github.com/GoogleChromeLabs/chrome-for-testing/issues/1 -then - echo -e "\033[1;34mInstalling Chromium..." - apt-get update - apt-get install -y chromium - ln -s /usr/bin/chromium /usr/local/bin/google-chrome - google-chrome --version +# There is no Chrome-for-testing build for linux/arm64, using Chromium instead +# https://github.com/GoogleChromeLabs/chrome-for-testing/issues/1 - apt-get install chromium-driver - chromedriver --version -else +if [ "$TARGETARCH" == "amd64" ] +then DISTR="Debian 12 (Bookworm)" # Installing dependencies for Chrome. Workaround for: # https://github.com/GoogleChromeLabs/chrome-for-testing/issues/55 @@ -23,11 +15,9 @@ else for dep in $deps; do apt-get install -y $dep done - - # Get latest chrome for testing version + # Get latest chrome-for-testing version json_chrome=$(curl -s https://googlechromelabs.github.io/chrome-for-testing/last-known-good-versions-with-downloads.json) - - # Install chrome + # Install Chrome echo -e "\033[1;34mInstalling Google Chrome..." latest_chrome=$(echo "$json_chrome" | jq -r ".channels.Stable.downloads.chrome[].url | select(contains(\"linux64\"))") curl -s --create-dirs -o chrome.zip --output-dir /opt/chrome "$latest_chrome" @@ -35,8 +25,7 @@ else ln -s /opt/chrome/chrome /usr/local/bin/google-chrome chmod +x /opt/chrome/chrome google-chrome --version - - # Install chromedriver + # Install Chromedriver echo -e "\033[1;34mInstalling Chromedriver..." latest_chromedriver=$(echo "$json_chrome" | jq -r ".channels.Stable.downloads.chromedriver[].url | select(contains(\"linux64\"))") curl -s --create-dirs -o chromedriver.zip --output-dir /opt/chromedriver "$latest_chromedriver" @@ -44,4 +33,14 @@ else ln -s /opt/chromedriver/chromedriver /usr/local/bin/chromedriver chmod +x /opt/chromedriver/chromedriver chromedriver --version +else + echo -e "\033[1;34mInstalling Chromium..." + apt-get update + apt-get install -y chromium + ln -s /usr/bin/chromium /usr/local/bin/google-chrome + google-chrome --version + + echo -e "\033[1;34mInstalling Chromedriver..." + apt-get install chromium-driver + chromedriver --version fi \ No newline at end of file diff --git a/catalyst_voices/test_driver/scripts/install-edge-linux64.sh b/catalyst_voices/test_driver/scripts/install-edge-linux64.sh index d2c215a8bf5..a941a0b3472 100644 --- a/catalyst_voices/test_driver/scripts/install-edge-linux64.sh +++ b/catalyst_voices/test_driver/scripts/install-edge-linux64.sh @@ -1,22 +1,22 @@ #!/bin/bash # This script installs Edge and Edgedriver. -if [ "$TARGETARCH" == "arm64" ] +# There is no Edge version build for linux/arm64, installing only for amd64 +# https://github.com/MicrosoftEdge/Status/issues/697 + +if [ "$TARGETARCH" == "amd64" ] then - PLATFORM=arm64 -else - PLATFORM=linux64 -fi -echo -e "\033[1;34mInstalling Edge..." -install -d -m 0755 /etc/apt/keyrings -curl -fSsL https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor | tee /etc/apt/keyrings/microsoft-edge.gpg > /dev/null -echo 'deb [signed-by=/etc/apt/keyrings/microsoft-edge.gpg] https://packages.microsoft.com/repos/edge stable main' | tee /etc/apt/sources.list.d/microsoft-edge.list -apt-get update && apt-get install -y microsoft-edge-stable -microsoft-edge-stable --version + echo -e "\033[1;34mInstalling Edge..." + install -d -m 0755 /etc/apt/keyrings + curl -fSsL https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor | tee /etc/apt/keyrings/microsoft-edge.gpg > /dev/null + echo 'deb [signed-by=/etc/apt/keyrings/microsoft-edge.gpg] https://packages.microsoft.com/repos/edge stable main' | tee /etc/apt/sources.list.d/microsoft-edge.list + apt-get update && apt-get install -y microsoft-edge-stable + microsoft-edge-stable --version -echo -e "\033[1;34mInstalling Edgedriver..." -edge_version=$(microsoft-edge-stable --version | grep -Eo '[0-9]+.+' | tr -d ' ') -curl -s --create-dirs -o msedgedriver.zip --output-dir /opt/msedgedriver "https://msedgedriver.azureedge.net/$edge_version/edgedriver_$PLATFORM.zip" -unzip -d /opt/msedgedriver -j /opt/msedgedriver/msedgedriver.zip && rm /opt/msedgedriver/msedgedriver.zip -ln -s /opt/msedgedriver/msedgedriver /usr/local/bin/msedgedriver -chmod +x /opt/msedgedriver/msedgedriver -msedgedriver --version \ No newline at end of file + echo -e "\033[1;34mInstalling Edgedriver..." + edge_version=$(microsoft-edge-stable --version | grep -Eo '[0-9]+.+' | tr -d ' ') + curl -s --create-dirs -o msedgedriver.zip --output-dir /opt/msedgedriver "https://msedgedriver.azureedge.net/$edge_version/edgedriver_linux64.zip" + unzip -d /opt/msedgedriver -j /opt/msedgedriver/msedgedriver.zip && rm /opt/msedgedriver/msedgedriver.zip + ln -s /opt/msedgedriver/msedgedriver /usr/local/bin/msedgedriver + chmod +x /opt/msedgedriver/msedgedriver + msedgedriver --version +fi \ No newline at end of file diff --git a/catalyst_voices/test_driver/scripts/install-firefox-linux64.sh b/catalyst_voices/test_driver/scripts/install-firefox-linux64.sh index 523123f468c..df964235192 100644 --- a/catalyst_voices/test_driver/scripts/install-firefox-linux64.sh +++ b/catalyst_voices/test_driver/scripts/install-firefox-linux64.sh @@ -1,24 +1,30 @@ #!/bin/bash # This script installs Firefox and Geckodriver. Geckodriver supported versions: # https://firefox-source-docs.mozilla.org/testing/geckodriver/Support.html -if [ "$TARGETARCH" == "arm64" ] +# Firefox for linux/arm64 is only in the esr or the unstable version, using the latter + +if [ "$TARGETARCH" == "amd64" ] then - PLATFORM=aarch64 -else PLATFORM=linux64 + echo -e "\033[1;34mInstalling Firefox..." + install -d -m 0755 /etc/apt/keyrings + curl -fSsL https://packages.mozilla.org/apt/repo-signing-key.gpg | tee /etc/apt/keyrings/packages.mozilla.org.asc > /dev/null + echo "deb [signed-by=/etc/apt/keyrings/packages.mozilla.org.asc] https://packages.mozilla.org/apt mozilla main" | tee -a /etc/apt/sources.list.d/mozilla.list > /dev/null + echo ' + Package: * + Pin: origin packages.mozilla.org + Pin-Priority: 1000 + ' | tee /etc/apt/preferences.d/mozilla + apt-get update && apt-get install -y firefox + firefox --version +else + PLATFORM=linux-aarch64 + echo -e "\033[1;34mInstalling Firefox..." + echo "deb http://deb.debian.org/debian/ sid main" >> /etc/apt/sources.list + apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0E98404D386FA1D9 6ED0E7B82643E131 + apt-get update && apt-get install -y libavcodec-extra firefox + firefox --version fi -echo -e "\033[1;34mInstalling Firefox..." -install -d -m 0755 /etc/apt/keyrings -curl -fSsL https://packages.mozilla.org/apt/repo-signing-key.gpg | tee /etc/apt/keyrings/packages.mozilla.org.asc > /dev/null -echo "deb [signed-by=/etc/apt/keyrings/packages.mozilla.org.asc] https://packages.mozilla.org/apt mozilla main" | tee -a /etc/apt/sources.list.d/mozilla.list > /dev/null -echo ' -Package: * -Pin: origin packages.mozilla.org -Pin-Priority: 1000 -' | tee /etc/apt/preferences.d/mozilla -apt-get update && apt-get install -y firefox -firefox --version - echo -e "\033[1;34mInstalling Geckodriver..." json_geckodriver=$(curl -s https://api.github.com/repos/mozilla/geckodriver/releases/latest) latest_geckodriver=$(echo "$json_geckodriver" | jq -r ".assets[].browser_download_url | select(contains(\"$PLATFORM\") and endswith(\"gz\"))") @@ -26,4 +32,4 @@ curl -sL --create-dirs -o geckodriver.tar.gz --output-dir /opt/geckodriver "$lat tar -xzf /opt/geckodriver/geckodriver.tar.gz -C /opt/geckodriver/ && rm /opt/geckodriver/geckodriver.tar.gz ln -s /opt/geckodriver/geckodriver /usr/local/bin/geckodriver chmod +x /opt/geckodriver/geckodriver -geckodriver --version \ No newline at end of file +geckodriver --version From 0ea33271d3e1a147a3837cd18595d83a001f52aa Mon Sep 17 00:00:00 2001 From: kukkok3 <93382903+kukkok3@users.noreply.github.com> Date: Tue, 16 Apr 2024 13:49:13 +0200 Subject: [PATCH 6/7] fix: cspell --- .config/dictionaries/project.dic | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.config/dictionaries/project.dic b/.config/dictionaries/project.dic index f822504d9f3..75bcee56183 100644 --- a/.config/dictionaries/project.dic +++ b/.config/dictionaries/project.dic @@ -78,9 +78,11 @@ jormungandr Jörmungandr junitreport Keyhash +keyserver lcov Leshiy libapp +libavcodec libflutter lintfix localizable From ec7069338cd2e8a410c914608133ad1c8e2a7b5f Mon Sep 17 00:00:00 2001 From: kukkok3 <93382903+kukkok3@users.noreply.github.com> Date: Tue, 16 Apr 2024 14:09:08 +0200 Subject: [PATCH 7/7] feat: dont test for edge on arm --- catalyst_voices/test_driver/Earthfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/catalyst_voices/test_driver/Earthfile b/catalyst_voices/test_driver/Earthfile index 6b240d5dac3..b68ca8fc4a9 100644 --- a/catalyst_voices/test_driver/Earthfile +++ b/catalyst_voices/test_driver/Earthfile @@ -2,6 +2,7 @@ VERSION --try --global-cache --arg-scope-and-set 0.7 integration-test-web: FROM ../+build + ARG TARGETARCH ARG browser LET driver_port = 4444 @@ -15,7 +16,7 @@ integration-test-web: # Commenting out Edge tests as they are failing due to: # https://github.com/flutter/flutter/issues/76213 # https://github.com/flutter/flutter/issues/142021 - #IF [ $browser = "edge" ] + #IF [ $browser = "edge" && $TARGETARCH = "amd64" ]] # LET driver = "msedgedriver" #END RUN ($driver --port=$driver_port > $driver.log &) && \