2929 - os : ubuntu-latest
3030 - os : windows-latest
3131 - os : macos-latest
32- arch : x86_64
33- - os : macos-latest
34- arch : arm64
3532 runs-on : ${{ matrix.os }}
3633 steps :
3734 - name : Checkout
@@ -85,11 +82,11 @@ jobs:
8582 - name : Configure
8683 shell : bash
8784 run : |
88- ARCH_FLAG =""
89- if [[ -n "${{ matrix.arch || '' }} " ]]; then
90- ARCH_FLAG ="-DCMAKE_OSX_ARCHITECTURES=${{ matrix.arch }} "
85+ UNIVERSAL_FLAG =""
86+ if [[ "${{ matrix.os }}" == "macos-latest " ]]; then
87+ UNIVERSAL_FLAG ="-DCHAPTERFORGE_UNIVERSAL=ON "
9188 fi
92- cmake -S . -B build -DENABLE_OUTPUT_TOOL_TESTS=ON -DCMAKE_BUILD_TYPE=Release ${ARCH_FLAG }
89+ cmake -S . -B build -DENABLE_OUTPUT_TOOL_TESTS=ON -DCMAKE_BUILD_TYPE=Release ${UNIVERSAL_FLAG }
9390
9491 - name : Build
9592 shell : bash
@@ -114,9 +111,6 @@ jobs:
114111 - os : ubuntu-latest
115112 - os : windows-latest
116113 - os : macos-latest
117- arch : x86_64
118- - os : macos-latest
119- arch : arm64
120114 runs-on : ${{ matrix.os }}
121115 steps :
122116 - name : Checkout
@@ -128,11 +122,11 @@ jobs:
128122 - name : Configure
129123 shell : bash
130124 run : |
131- ARCH_FLAG =""
132- if [[ -n "${{ matrix.arch || '' }} " ]]; then
133- ARCH_FLAG ="-DCMAKE_OSX_ARCHITECTURES=${{ matrix.arch }} "
125+ UNIVERSAL_FLAG =""
126+ if [[ "${{ matrix.os }}" == "macos-latest " ]]; then
127+ UNIVERSAL_FLAG ="-DCHAPTERFORGE_UNIVERSAL=ON "
134128 fi
135- cmake -S . -B build -DENABLE_OUTPUT_TOOL_TESTS=OFF -DCMAKE_BUILD_TYPE=Release ${ARCH_FLAG }
129+ cmake -S . -B build -DENABLE_OUTPUT_TOOL_TESTS=OFF -DCMAKE_BUILD_TYPE=Release ${UNIVERSAL_FLAG }
136130
137131 - name : Build
138132 shell : bash
@@ -187,8 +181,8 @@ jobs:
187181 run : |
188182 mkdir -p dist
189183 suffix="-${{ matrix.os }}"
190- if [[ -n "${{ matrix.arch || '' }} " ]]; then
191- suffix="${suffix}-${{ matrix.arch }} "
184+ if [[ "${{ matrix.os }}" == "macos-latest " ]]; then
185+ suffix="${suffix}-universal "
192186 fi
193187 ver="${GITHUB_REF##*/}"
194188 if [[ "${{ github.event_name }}" == "workflow_dispatch" && "${{ github.event.inputs.dry_run }}" == "true" ]]; then
@@ -217,7 +211,7 @@ jobs:
217211 - name : Upload artifact
218212 uses : actions/upload-artifact@v4
219213 with :
220- name : chapterforge-${{ matrix.os }}${{ matrix.arch && format('-{0}', matrix.arch) || '' }}
214+ name : chapterforge-${{ matrix.os }}${{ matrix.os == 'macos-latest' && '-universal' || '' }}
221215 path : dist/*
222216
223217 publish :
0 commit comments