Skip to content

Commit

Permalink
Download artifact correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
ianks committed Apr 18, 2024
1 parent e23961f commit 4568aaa
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,7 @@ jobs:
name: cross-gem-${{ matrix.platform }}
- name: Test
run: |
ls -lah
find .
gem install --no-document --force cross-gem-${{ matrix.platform }}/*.gem
gem install --no-document --verbose tokenizers-*.gem
ruby -rtokenizers -e 'print Tokenizers.from_pretrained("bert-base-cased").encode("I can feel the magic, can you?").tokens'
test-windows:
Expand All @@ -86,9 +84,7 @@ jobs:
- name: Test
shell: bash
run: |
ls -lah
find .
gem install --no-document --force cross-gem-${{ matrix.platform }}/*.gem
gem install --no-document --verbose tokenizers-*.gem
ruby -rtokenizers -e 'print Tokenizers.from_pretrained("bert-base-cased").encode("I can feel the magic, can you?").tokens'
test-linux:
Expand All @@ -115,16 +111,13 @@ jobs:
gem install rb_sys
docker_platform="$(ruby -rrb_sys -e 'puts RbSys::ToolchainInfo.new("${{ matrix.platform }}").docker_platform')"
if [[ "${{ matrix.platform }}" == *-musl ]]; then
base_image="alpine:latest"
install_cmd="apk add --no-cache ruby"
base_image="ruby:3-alpine"
else
base_image="${{ matrix.platform }}"
install_cmd="apt-get update && apt-get install -y ruby"
base_image="ruby:3-slim"
fi
docker buildx build --platform $docker_platform -t test-${{ matrix.platform }} - <<EOF
FROM $base_image
RUN $install_cmd
COPY *.gem /tmp/
RUN gem install /tmp/*.gem
RUN gem install --no-document --verbose /tmp/*.gem
RUN ruby -rtokenizers -e 'print Tokenizers.from_pretrained("bert-base-cased").encode("I can feel the magic, can you?").tokens'
EOF

0 comments on commit 4568aaa

Please sign in to comment.