File tree Expand file tree Collapse file tree 1 file changed +69
-0
lines changed
Expand file tree Collapse file tree 1 file changed +69
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Build and Debug Precompiled Gem
2+
3+ on :
4+ workflow_dispatch :
5+ push :
6+ tags : ["v*"]
7+ pull_request :
8+
9+ concurrency :
10+ group : ${{ github.workflow }}-${{ github.ref }}
11+ cancel-in-progress : true
12+
13+ jobs :
14+ build :
15+ name : Build Native Gems
16+ strategy :
17+ matrix :
18+ os : [ubuntu-latest, macos-latest, windows-latest]
19+ target :
20+ - " default"
21+ - " aarch64-linux"
22+ - " x86_64-linux"
23+ - " x86_64-linux-musl"
24+ - " aarch64-linux-musl"
25+ - " x64-mingw-ucrt"
26+ - " x86_64-darwin"
27+ - " arm64-darwin"
28+ runs-on : ${{ matrix.os }}
29+ steps :
30+ - uses : actions/checkout@v4
31+
32+ - name : Setup Ruby
33+ uses : ruby/setup-ruby@v1
34+ with :
35+ bundler-cache : false
36+
37+ - name : Install Linux build tools
38+ if : runner.os == 'Linux'
39+ run : |
40+ sudo apt-get update
41+ sudo apt-get install -y build-essential
42+
43+ - name : Install macOS build tools
44+ if : runner.os == 'macOS'
45+ run : |
46+ brew update
47+ brew install autoconf automake
48+
49+ - name : Install Windows build tools
50+ if : runner.os == 'Windows'
51+ run : choco install visualstudio2019buildtools --yes
52+
53+ - name : Compile C extension
54+ run : |
55+ make
56+
57+ - name : Build gem
58+ run : gem build my_gem.gemspec
59+
60+ - name : Rename artifact for target
61+ run : |
62+ gem_file=$(ls *.gem)
63+ mv "$gem_file" "${gem_file%.gem}-${{ matrix.target }}.gem"
64+ echo "Renamed gem file to: ${gem_file%.gem}-${{ matrix.target }}.gem"
65+
66+ - name : List Generated Gem Artifacts
67+ run : |
68+ echo "Listing generated .gem files:"
69+ ls -al *.gem
You can’t perform that action at this time.
0 commit comments