Skip to content

Commit

Permalink
Merge pull request #313 from otiai10/develop
Browse files Browse the repository at this point in the history
Fix clearlinux test case
  • Loading branch information
otiai10 authored Jul 26, 2024
2 parents 769a448 + b0b6bc7 commit 8aa85a7
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/go-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
- name: Coverage Test
run: go test -v -cover -race -coverprofile=coverage -covermode=atomic
- name: Upload coverage
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
file: ./coverage
verbose: true
token: ${{ secrets.CODECOV_TOKEN }}
4 changes: 4 additions & 0 deletions test/runtime
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,10 @@ function test_docker_runtimes() {
fi
fi
echo "┌───────────── ${testcase}"
# q: Is following line correct?
# XXX: Since clearlinux docker image doesn't support ARM64 architecture, as of 2024-07-26a,
# we need to add `--platform linux/amd64` to the `docker build` command when we build it on macos M3 chip.
# if [ ${testcase} == "clearlinux" ]; then DOCKER_PLATFORM_ARG="--platform linux/amd64"; fi
if [ -n "${BUILD}" ]; then
echo "│ [Docker] Building image..."
docker build . ${NO_CACHE} -f ${runtime} -t gosseract/test:${testcase} ${QUIET} | sed "s/^/│ /"
Expand Down
6 changes: 5 additions & 1 deletion test/runtimes/clearlinux.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,16 @@ RUN swupd bundle-add \
# This part should be replaced by curl,
# which is installed by default.
RUN swupd bundle-add wget
ENV TESSDATA_PREFIX /usr/share/tessdata
RUN mkdir -p ${TESSDATA_PREFIX}
RUN wget \
-O eng.traineddata \
https://github.com/tesseract-ocr/tessdata/blob/main/eng.traineddata?raw=true \
&& mv eng.traineddata /usr/share/tessdata
&& mv eng.traineddata ${TESSDATA_PREFIX}/eng.traineddata
# }}}

ENV GOPATH /go

RUN mkdir -p ${GOPATH}/src/github.com/otiai10
ADD . ${GOPATH}/src/github.com/otiai10/gosseract
WORKDIR ${GOPATH}/src/github.com/otiai10/gosseract
Expand Down

0 comments on commit 8aa85a7

Please sign in to comment.