From 44686767a42a629823e516c20d77bdfeb987ab1f Mon Sep 17 00:00:00 2001 From: Yousaf Nabi Date: Thu, 17 Aug 2023 22:49:03 +0100 Subject: [PATCH] chore: windows - rubyc.exe centos, docker - build without bundle exec --- .cirrus.yml | 9 ++++++--- .github/workflows/windows.yml | 20 +++++++++++++++++++- Dockerfile | 11 ++++++----- 3 files changed, 31 insertions(+), 9 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 8ba173284..db56ebd9b 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -120,11 +120,11 @@ macos_arm_task: get_ruby_source_and_patch_script: | bundle install && bundle exec rake patch_ruby_source # build_script: | # For OpenSSL 3.1 - # bin/rubyc bin/rubyc -o rubyc --openssl-dir=brew --prefix openssl@3.1 + # bin/rubyc bin/rubyc -o rubyc --openssl-dir=$(brew --prefix openssl@3.1) build_script: | # For OpenSSL 3.0 - bin/rubyc bin/rubyc -o rubyc --openssl-dir=brew --prefix openssl@3.0 + bin/rubyc bin/rubyc -o rubyc --openssl-dir=$(brew --prefix openssl@3.0) # build_script: | # For OpenSSL 1.1 - # bin/rubyc bin/rubyc -o rubyc --openssl-dir=/opt/homebrew/opt/openssl@1.1 + # bin/rubyc bin/rubyc -o rubyc --openssl-dir=$(brew --prefix openssl@1.1) test_script: | chmod +x ./rubyc ./rubyc --help @@ -143,6 +143,9 @@ task: - arm_container: matrix: - dockerfile: Dockerfile + - ∂container: + matrix: + - dockerfile: Dockerfile test_script: | rubyc --help rubyc --version diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index e67ef6c7e..34694978f 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -75,8 +75,26 @@ jobs: run: | call "C:\Program Files (x86)\Microsoft Visual Studio\${{ matrix.vs }}\Enterprise\VC\Auxiliary\Build\vcvars64.bat" mkdir C:\rubyc_tmp - bundle exec rake rubyc + bundle exec rake rubyc.exe shell: cmd + - name: "Package rubyc" + run: | + mkdir -p pkg + export RUBYC_FILENAME=rubyc-$(uname -s)-$(uname -m).exe + export RUBYC_ARCHIVE_FILENAME=${RUBYC_FILENAME}.tar.gz + cp rubyc.exe pkg/$RUBYC_FILENAME + cd pkg + tar -czvf $RUBYC_ARCHIVE_FILENAME $RUBYC_FILENAME + echo "RUBYC_FILENAME=$RUBYC_FILENAME" >> $GITHUB_ENV + echo "RUBYC_ARCHIVE_FILENAME=$RUBYC_ARCHIVE_FILENAME" >> $GITHUB_ENV + ls -l + if [[ $GITHUB_REF == "refs/heads/$PUBLISH_BRANCH" ]]; then + gh release upload "${NEXT_TAG}" $RUBYC_ARCHIVE_FILENAME --repo "${REPO}" --clobber + else + echo "Not on $PUBLISH_BRANCH branch, skipping upload" + fi + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: "[Enclose.IO] Create Windows Test run upload" uses: actions/upload-artifact@v3 with: diff --git a/Dockerfile b/Dockerfile index d6c79b60f..8d6bb0623 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,12 +14,13 @@ RUN ruby --version RUN bundler --version WORKDIR /app COPY . . -RUN bundle install -ARG OPEN_SSL_VERSION=1.1.1v -ENV OPEN_SSL_VERSION=$OPEN_SSL_VERSION +# The latest Traveling ruby 3.2.2 has bundler 2.4.18 installed +RUN bundle _2.4.18_ install +# ARG OPEN_SSL_VERSION=1.1.1v +# ENV OPEN_SSL_VERSION=$OPEN_SSL_VERSION RUN bundle exec rake patch_ruby_source -RUN bundle exec rake rubyc -# RUN bin/rubyc bin/rubyc -o rubyc +# RUN bundle exec rake rubyc +RUN bin/rubyc bin/rubyc -o rubyc RUN LD_LIBRARY_PATH=/tmp/rubyc/local/lib:$LD_LIBRARY_PATH ./rubyc --help