Skip to content

Commit

Permalink
fix: xcode 15.4/clang 15 support and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
maxirmx committed Jul 20, 2024
1 parent 74e6739 commit 9bc0adf
Show file tree
Hide file tree
Showing 8 changed files with 47 additions and 27 deletions.
9 changes: 7 additions & 2 deletions .github/actions/setup-tebako/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ inputs:
required: false
default:
type: string
xcode:
description: XCode version
required: false
default:
type: string
verbose:
description: Enable verbose output
required: false
Expand Down Expand Up @@ -96,10 +101,10 @@ runs:
echo "CC=${{ inputs.cc || 'clang' }}" >> $GITHUB_ENV
echo "CXX=${{ inputs.cxx || 'clang++' }}" >> $GITHUB_ENV
if [ "${{ runner.arch }}" = "X64" ]; then
echo "XCODE_VERSION=13.1" >> $GITHUB_ENV
echo "XCODE_VERSION=${{ inputs.xcode || '13.1' }}" >> $GITHUB_ENV
echo "TOOLCHAIN=macos-x86_64" >> $GITHUB_ENV
else
echo "XCODE_VERSION=14.3.1" >> $GITHUB_ENV
echo "XCODE_VERSION=${{ inputs.xcode || '14.3.1' }}" >> $GITHUB_ENV
echo "TOOLCHAIN=macos-arm64" >> $GITHUB_ENV
fi
elif [[ "$OS" = "MINGW64"* ]]; then
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/test-set-1/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ runs:
VERBOSE=${{ inputs.verbose }} RUBY_VER=${{ matrix.package_ruby_ver }} tests/scripts/functional-tests.sh
- name: Strip tebako test packages
if: ${{ !contains(matrix.os, 'macos') && inputs.upload == 'true' }}
if: ${{ !contains(matrix.env.os, 'macos') && inputs.upload == 'true' }}
shell: bash
run: strip *-package

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gem-test-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ jobs:
gem: [ metanorma, fontist ]
package_ruby_ver: [ '3.1.6' ]
env:
- { CC: clang, CXX: clang++ }
- { CC: clang-12, CXX: clang++-12 }
env: ${{ matrix.env }}
steps:
- name: Download actions
Expand Down
53 changes: 34 additions & 19 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,15 @@ env:

jobs:
setup:
name: setup ${{ matrix.os }} with Ruby ${{ matrix.ruby_ver }}
runs-on: ${{ matrix.os }}
name: setup ${{ matrix.env.os }} XCode ${{ matrix.env.xcode }} Ruby ${{ matrix.ruby_ver }}
runs-on: ${{ matrix.env.os }}
strategy:
fail-fast: false
matrix:
os: [ macos-12, macos-14 ]
env:
- { os: macos-12, xcode: 13.1 }
- { os: macos-14, xcode: 14.3.1 }
- { os: macos-14, xcode: 15.4 }
ruby_ver: ['3.1.6', '3.3.3']
steps:
- name: Checkout tebako packaging environment
Expand All @@ -73,13 +76,14 @@ jobs:
cache: off
install: off
ruby_version: ${{ matrix.ruby_ver }}
xcode: ${{ matrix.env.xcode }}

- name: Setup development environment
uses: ./.github/actions/setup-tebako-development
with:
path: deps
os: ${{ matrix.os }}
cc: ruby-${{ matrix.ruby_ver }}
os: ${{ matrix.env.os }}
cc: ruby-${{ matrix.ruby_ver }}-XCode-${{ matrix.env.xcode }}
version: ${{ env.CACHE_VER }}

- name: tebako setup
Expand All @@ -88,14 +92,18 @@ jobs:
tests-1:
needs: setup
name: tests-1 ${{ matrix.os }} package Ruby ${{ matrix.package_ruby_ver }} on Ruby ${{ matrix.ruby_ver }}
runs-on: ${{ matrix.os }}
name: tests-1 package Ruby ${{ matrix.package_ruby_ver }} on ${{ matrix.env.os }}, XCode ${{ matrix.env.xcode }}, Ruby ${{ matrix.ruby_ver }}
runs-on: ${{ matrix.env.os }}
strategy:
fail-fast: false
matrix:
os: [ macos-12, macos-14 ]
env:
- { os: macos-12, xcode: 13.1 }
- { os: macos-14, xcode: 14.3.1 }
package_ruby_ver: [ '3.1.6', '3.2.4' ]
ruby_ver: ['3.1.6', '3.3.3']
ruby_ver: ['3.1.6']
include:
- { env: { os: macos-14, xcode: 15.4 }, ruby_ver: '3.3.3', package_ruby_ver: '3.2.4' }
steps:
- name: Checkout tebako packaging environment
uses: actions/checkout@v4
Expand All @@ -109,25 +117,26 @@ jobs:
cache: off
install: off
ruby_version: ${{ matrix.ruby_ver }}
xcode: ${{ matrix.env.xcode }}
verbose: ${{ env.VERBOSE }}

- name: Setup development environment
uses: ./.github/actions/setup-tebako-development
with:
path: deps
os: ${{ matrix.os }}
cc: ruby-${{ matrix.ruby_ver }}
os: ${{ matrix.env.os }}
cc: ruby-${{ matrix.ruby_ver }}-XCode-${{ matrix.env.xcode }}
version: ${{ env.CACHE_VER }}

- name: Shall upload artifacts?
id: shall-upload
run: |
if [ "${{ matrix.package_ruby_ver }}" == "3.1.6" ] && [ "${{ matrix.ruby_ver }}" == "3.1.6" ] && [ "${{ matrix.os }}" == "macos-12" ]; then
if [ "${{ matrix.package_ruby_ver }}" == "3.1.6" ] && [ "${{ matrix.ruby_ver }}" == "3.1.6" ] && [ "${{ matrix.env.os }}" == "macos-12" ]; then
echo "upload=true" >> $GITHUB_OUTPUT
else
echo "upload=false" >> $GITHUB_OUTPUT
fi
- name: Run test set 1
uses: ./.github/actions/test-set-1
with:
Expand All @@ -136,14 +145,19 @@ jobs:

tests-2:
needs: setup
name: tests-2 ${{ matrix.os }} Ruby ${{ matrix.package_ruby_ver }} on Ruby ${{ matrix.ruby_ver }}
runs-on: ${{ matrix.os }}
name: tests-2 package Ruby ${{ matrix.package_ruby_ver }} on ${{ matrix.env.os }}, XCode ${{ matrix.env.xcode }}, Ruby ${{ matrix.ruby_ver }}
runs-on: ${{ matrix.env.os }}
strategy:
fail-fast: false
matrix:
os: [ macos-12, macos-14 ]
env:
- { os: macos-12, xcode: 13.1 }
- { os: macos-14, xcode: 14.3.1 }
package_ruby_ver: [ '3.1.6', '3.2.4' ]
ruby_ver: ['3.1.6', '3.3.3']
ruby_ver: ['3.1.6']
include:
- { env: { os: macos-14, xcode: 15.4 }, ruby_ver: '3.3.3', package_ruby_ver: '3.2.4' }

steps:
- name: Checkout tebako packaging environment
uses: actions/checkout@v4
Expand All @@ -157,13 +171,14 @@ jobs:
cache: off
install: off
ruby_version: ${{ matrix.ruby_ver }}
xcode: ${{ matrix.env.xcode }}

- name: Setup development environment
uses: ./.github/actions/setup-tebako-development
with:
path: deps
os: ${{ matrix.os }}-ruby-${{ matrix.ruby_ver }}
cc: ruby-${{ matrix.ruby_ver }}
os: ${{ matrix.env.os }}-ruby-${{ matrix.ruby_ver }}
cc: ruby-${{ matrix.ruby_ver }}-XCode-${{ matrix.env.xcode }}
version: ${{ env.CACHE_VER }}

- name: Run tebako tests (set no. 2)
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ if(DWARFS_PRELOAD)
list(GET LIBDWARFS_WR_VER_COMPONENTS 2 LIBDWARFS_WR_VER_PATCH)
set (LIBDWARFS_WR_VER_M ${LIBDWARFS_WR_VER_MAJOR}.${LIBDWARFS_WR_VER_MINOR}.${LIBDWARFS_WR_VER_PATCH})
else(DWARFS_PRELOAD)
def_ext_prj_g(DWARFS_WR "v0.5.3")
def_ext_prj_g(DWARFS_WR "v0.5.4")
endif(DWARFS_PRELOAD)

set(LIBYAML_RUBY_OPTION "")
Expand Down
2 changes: 1 addition & 1 deletion common.env
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
BUILD_TYPE=Release
DEPS=deps
INCBIN_TAG=348e36b
DWARFS_WR_TAG=v0.5.3
DWARFS_WR_TAG=v0.5.4
RUBY_VER=3.1.6
2 changes: 1 addition & 1 deletion lib/tebako/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@
# POSSIBILITY OF SUCH DAMAGE.

module Tebako
VERSION = "0.7.2"
VERSION = "0.7.3"
end
2 changes: 1 addition & 1 deletion tools

0 comments on commit 9bc0adf

Please sign in to comment.