diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4bfd2a1..472617f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,7 +8,7 @@ jobs: lint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@master + - uses: actions/checkout@v4 - name: Set up Ruby uses: ruby/setup-ruby@v1 with: @@ -23,14 +23,10 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - os: [linux, darwin, windows] - arch: [amd64] + os-arch: [linux-amd64, darwin-arm64, windows-amd64] include: - - os: windows + - os-arch: windows-amd64 suffix: .exe - exclude: - - os: windows - arch: arm64 steps: - uses: actions/checkout@v4 - name: Login to Docker Hub @@ -44,24 +40,24 @@ jobs: ruby-version: 3.3 bundler-cache: true - name: build - run: rake build:${{ matrix.os }}-${{ matrix.arch }} + run: rake build:${{ matrix.os-arch }} - - name: Upload test binary (${{ matrix.os }}-${{ matrix.arch }}}) + - name: Upload test binary (${{ matrix.os-arch }} uses: actions/upload-artifact@v4 with: - name: rf-${{ github.sha }}-${{ matrix.os }}-${{ matrix.arch }} - path: build/${{ matrix.os }}-${{ matrix.arch }}/bin/rf${{ matrix.suffix }} + name: rf-${{ github.sha }}-${{ matrix.os-arch }} + path: build/${{ matrix.os-arch }}/bin/rf${{ matrix.suffix }} test: needs: build strategy: matrix: - runs-on: [ubuntu-latest, macos-latest, windows-latest] + runs-on: [ubuntu-latest, macos-14, windows-latest] include: - runs-on: ubuntu-latest os-arch: linux-amd64 - - runs-on: macos-latest - os-arch: darwin-amd64 + - runs-on: macos-14 + os-arch: darwin-arm64 - runs-on: windows-latest os-arch: windows-amd64 runs-on: ${{ matrix.runs-on }} diff --git a/Gemfile.lock b/Gemfile.lock index 736bc23..41c98e5 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -126,8 +126,8 @@ GEM parser (>= 3.2.2.4) PLATFORMS + arm64-darwin-22 x64-mingw-ucrt - x86_64-darwin-20 x86_64-linux DEPENDENCIES diff --git a/README.md b/README.md index d4a66b2..1e5a348 100644 --- a/README.md +++ b/README.md @@ -62,11 +62,11 @@ You can download rf from the [Release page](https://github.com/buty4649/rf/relea Binary files are provided for each platform and architecture. Please refer to the following table for each corresponding status. -| | amd64 | arm64| -|-----|-------|------| -|Linux|✅ |✅ | -|MacOS|✅ |✅ | -|Windows|✅ |- | +| | amd64 | arm64| +|-------|-------|------| +|Linux |✅ |✅ | +|MacOS |- |✅ | +|Windows|✅ |- | You can also install it using each package manager as another method. diff --git a/Rakefile b/Rakefile index c399921..226cc5b 100644 --- a/Rakefile +++ b/Rakefile @@ -15,7 +15,7 @@ end def build_targets %w[ linux-amd64 linux-arm64 - darwin-amd64 darwin-arm64 + darwin-arm64 windows-amd64 ] end diff --git a/build_config.rb b/build_config.rb index 257df39..8ab4168 100644 --- a/build_config.rb +++ b/build_config.rb @@ -54,25 +54,6 @@ def build_cc_defines(conf) end end -if build_targets.include?('darwin-amd64') - MRuby::CrossBuild.new('darwin-amd64') do |conf| - macos_sdk = ENV.fetch('MACOSX_SDK_PATH').shellescape - - build_config(conf, 'x86_64-macos', strip: true) - conf.cc.flags += ['-Wno-overriding-t-option', '-mmacosx-version-min=10.14', - '-isysroot', macos_sdk, '-iwithsysroot', '/usr/include', - '-iframeworkwithsysroot', '/System/Library/Frameworks'] - conf.linker.flags += ['-Wno-overriding-t-option', '-mmacosx-version-min=10.14', - '--sysroot', macos_sdk, '-F/System/Library/Frameworks', '-L/usr/lib'] - conf.archiver.command = 'zig ar' - ENV['RANLIB'] ||= 'zig ranlib' - conf.host_target = 'x86_64-darwin' - - debug_config(conf) - gem_config(conf) - end -end - if build_targets.include?('darwin-arm64') MRuby::CrossBuild.new('darwin-arm64') do |conf| macos_sdk = ENV.fetch('MACOSX_SDK_PATH').shellescape