Skip to content

Commit

Permalink
Update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
zyc9012 committed Dec 26, 2024
1 parent 4710dd9 commit e5396f0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true
- name: Set up Ruby
Expand All @@ -33,7 +33,7 @@ jobs:
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Build gem
run: gem build *.gemspec
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: gem
path: '*.gem'
Expand All @@ -43,7 +43,7 @@ jobs:
memory-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true
- name: Set up Ruby
Expand All @@ -66,15 +66,15 @@ jobs:
os: ['ubuntu', 'macos', 'windows']
runs-on: ${{ matrix.os }}-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
# bundler-cache: true
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: gem
- name: Install gem
Expand Down
15 changes: 8 additions & 7 deletions .github/workflows/gem-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
contents: read
packages: write
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true
- name: Set up Ruby 2.6
Expand All @@ -31,7 +31,7 @@ jobs:
gem install *.gem
bundle install
rake test:gem
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: "ruby-gem"
path: "*.gem"
Expand All @@ -47,32 +47,33 @@ jobs:
contents: read
packages: write
container:
image: "ghcr.io/rake-compiler/rake-compiler-dock-image:1.4.0-mri-${{ matrix.platform }}"
image: "ghcr.io/rake-compiler/rake-compiler-dock-image:1.7.0-mri-${{ matrix.platform }}"
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true
- name: Build native gem
shell: bash
run: |
bundle install
bundle exec rake gem:${{ matrix.platform }}:build
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: "${{ matrix.platform }}-gem"
path: pkg/*.gem

publish:
if: startsWith(github.ref, 'refs/tags/v')
# if: startsWith(github.ref, 'refs/tags/v')
needs: ['build-ruby', 'build-native']
strategy:
matrix:
platform: ['ruby', 'x86-mingw32', 'x64-mingw-ucrt', 'x64-mingw32', 'x86_64-linux', 'x86_64-darwin', 'arm64-darwin']
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: "${{ matrix.platform }}-gem"
path: pkg
- name: List files
run: ls -l pkg
# - name: Publish to RubyGems
Expand Down

0 comments on commit e5396f0

Please sign in to comment.