Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Development improvements #233

Merged
merged 8 commits into from
Nov 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ jobs:
runs-on: ubuntu-latest
needs: Docker
container:
env:
OPT_TRACE: ${{ runner.debug }}
OPT_VERBOSE: true
image: ea31337/ea-tester:dev
volumes:
- ${{ github.workspace }}/scripts/tests:/opt/scripts
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/tests-shell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ jobs:
working-directory: scripts/tests
runs-on: ubuntu-latest
container:
env:
OPT_TRACE: ${{ runner.debug }}
OPT_VERBOSE: true
image: ea31337/ea-tester:dev
strategy:
matrix:
Expand Down
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ RUN eval.sh install_mt $MT_VER && \
# Clean up.
RUN eval.sh clean_bt && \
eval.sh clean_ea && \
eval.sh clean_files
eval.sh clean_files && \
find /tmp -mindepth 1 -print -delete

# Install MT5 platform.
FROM ea-tester-base AS ea-tester-with-mt5
Expand Down
16 changes: 8 additions & 8 deletions scripts/.funcs.cmds.inc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -557,10 +557,10 @@ ea_find()
echo "$file"
return
}
result=$(find -L . "$WORKDIR" "$ROOT" ~ -maxdepth 5 -type f '(' -iname "$file" -o -iname "${file%.*}.mq${mt_ver}" ')' -print -quit)
[ -z "$result" ] && result=$(find -L . "$WORKDIR" "$ROOT" ~ -maxdepth 5 -type f '(' -iname "$file" -o -name "${file%.*}.ex${mt_ver}" ')' -print -quit)
[ -z "$result" ] && result=$(find -L . "$WORKDIR" "$ROOT" ~ -maxdepth 5 -type f -iname "*${file%.*}*.mq${mt_ver}" -print -quit)
[ -z "$result" ] && result=$(find -L . "$WORKDIR" "$ROOT" ~ -maxdepth 5 -type f -iname "*${file%.*}*.ex${mt_ver}" -print -quit)
result=$(find -L . "$WORKDIR" "$ROOT" ~ -maxdepth 4 -type f '(' -iname "$file" -o -iname "${file%.*}.mq${mt_ver}" ')' -print -quit)
[ -z "$result" ] && result=$(find -L . "$WORKDIR" "$ROOT" ~ -maxdepth 4 -type f '(' -iname "$file" -o -name "${file%.*}.ex${mt_ver}" ')' -print -quit)
[ -z "$result" ] && result=$(find -L . "$WORKDIR" "$ROOT" -maxdepth 5 -type f -iname "*${file%.*}*.mq${mt_ver}" -print -quit)
[ -z "$result" ] && result=$(find -L . "$WORKDIR" "$ROOT" -maxdepth 5 -type f -iname "*${file%.*}*.ex${mt_ver}" -print -quit)
echo ${result#./}
cd - &> /dev/null
}
Expand All @@ -586,10 +586,10 @@ script_find()
echo "$file"
return
}
result=$(find -L . "$WORKDIR" "$ROOT" ~ -maxdepth 5 -type f '(' -iname "$file" -o -iname "${file%.*}.mq${mt_ver}" ')' -print -quit)
[ -z "$result" ] && result=$(find -L . "$WORKDIR" "$ROOT" ~ -maxdepth 5 -type f '(' -iname "$file" -o -name "${file%.*}.ex${mt_ver}" ')' -print -quit)
[ -z "$result" ] && result=$(find -L . "$WORKDIR" "$ROOT" ~ -maxdepth 5 -type f -iname "*${file%.*}*.mq${mt_ver}" -print -quit)
[ -z "$result" ] && result=$(find -L . "$WORKDIR" "$ROOT" ~ -maxdepth 5 -type f -iname "*${file%.*}*.ex${mt_ver}" -print -quit)
result=$(find -L . "$WORKDIR" "$ROOT" ~ -maxdepth 4 -type f '(' -iname "$file" -o -iname "${file%.*}.mq${mt_ver}" ')' -print -quit)
[ -z "$result" ] && result=$(find -L . "$WORKDIR" "$ROOT" ~ -maxdepth 4 -type f '(' -iname "$file" -o -name "${file%.*}.ex${mt_ver}" ')' -print -quit)
[ -z "$result" ] && result=$(find -L . "$WORKDIR" "$ROOT" -maxdepth 5 -type f -iname "*${file%.*}*.mq${mt_ver}" -print)
[ -z "$result" ] && result=$(find -L . "$WORKDIR" "$ROOT" -maxdepth 5 -type f -iname "*${file%.*}*.ex${mt_ver}" -print)
echo ${result#./}
cd - &> /dev/null
}
Expand Down
6 changes: 3 additions & 3 deletions scripts/provision.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# Initialize script.
(("$OPT_NOERR")) || set -e
(("$OPT_TRACE")) && set -x
if [ -z "$CI" -a ! -d /vagrant -a ! -d /home/travis -a ! -f /.dockerenv ]; then
if [ -z "$CI" -a ! -d /vagrant -a ! -d /home/ubuntu -a ! -d /home/travis -a ! -f /.dockerenv ]; then
echo "Error: This script needs to be run within container." >&2
exit 1
elif [ -f ~/.provisioned -a -z "$OPT_FORCE" ]; then
Expand Down Expand Up @@ -124,7 +124,7 @@ case "$(uname -s)" in
curl -L chls.pro/ssl > /usr/local/share/ca-certificates/charles.crt && update-ca-certificates
# Adds GPG release key.
apt-key add < <(curl -S https://www.charlesproxy.com/packages/apt/PublicKey)
# Adds APT Wine repository.
# Adds APT repository.
add-apt-repository -y "deb https://www.charlesproxy.com/packages/apt/ charles-proxy main"
# Install HTTPS transport driver.
apt-get install -qq apt-transport-https
Expand All @@ -146,7 +146,7 @@ case "$(uname -s)" in

# Install wine and dependencies.
# @see: https://wiki.winehq.org/Ubuntu
apt-get install -qq winehq-staging # Install Wine.
apt-get install -qq winehq-devel # Install Wine.
apt-get install -qq wine-gecko winbind || true # Install Wine recommended libraries.
apt-get install -qq xvfb xdotool x11-utils xterm # Virtual frame buffer and X11 utils.

Expand Down
Loading