Skip to content

Commit a8a0566

Browse files
authored
Merge pull request #35 from popmonkey/gh-workflow-fixes
Gh workflow fixes * integration tests should always run in windows * switch to using gh for asset upload in windows * include all headers when creating release assets
2 parents 85687c6 + 9450034 commit a8a0566

7 files changed

Lines changed: 26 additions & 35 deletions

File tree

.github/workflows/linux-build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,8 +177,8 @@ jobs:
177177
# Using find/cp with wildcard to be robust against lib vs lib64 differences
178178
find dist -name "libjres_solver.*" -exec cp {} package/lib/ \;
179179
180-
# Specific Header
181-
cp dist/include/jres_solver/jres_solver.hpp package/include/jres_solver/
180+
# Public Headers
181+
cp dist/include/jres_solver/*.hpp package/include/jres_solver/
182182
183183
# Archive the 'package' folder content
184184
cd package

.github/workflows/macos-build.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,16 @@ jobs:
9292
# ---------------------------------------------------------
9393
- name: Configure CMake
9494
run: |
95+
# Determine target architecture for CMake (x64 input -> x86_64 flag)
96+
if [[ "${{ inputs.arch }}" == "x64" ]]; then
97+
CMAKE_ARCH="x86_64"
98+
else
99+
CMAKE_ARCH="arm64"
100+
fi
101+
95102
cmake -B build \
96103
-DCMAKE_BUILD_TYPE=Release \
104+
-DCMAKE_OSX_ARCHITECTURES="$CMAKE_ARCH" \
97105
-DCMAKE_PREFIX_PATH="${{ env.HIGHS_DIR }}" \
98106
-DCMAKE_INSTALL_PREFIX="${{ github.workspace }}/dist" \
99107
-DBUILD_SHARED_LIBS=OFF \
@@ -161,8 +169,8 @@ jobs:
161169
# Using find/cp with wildcard to be robust
162170
find dist -name "libjres_solver.*" -exec cp {} package/lib/ \;
163171
164-
# Specific Header
165-
cp dist/include/jres_solver/jres_solver.hpp package/include/jres_solver/
172+
# Public Headers
173+
cp dist/include/jres_solver/*.hpp package/include/jres_solver/
166174
167175
# Archive the 'package' folder content
168176
cd package

.github/workflows/macos-ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
name: "macOS Intel (x64)"
2828
version: ${{ github.ref_name }}
2929
platform: "darwin"
30-
os: macos-13
30+
os: macos-15
3131
arch: x64
3232
asset_ext: tar.gz
3333
upload_assets: false
@@ -40,7 +40,7 @@ jobs:
4040
name: "macOS Apple Silicon (arm64)"
4141
version: ${{ github.ref_name }}
4242
platform: "darwin"
43-
os: macos-14
43+
os: macos-15
4444
arch: arm64
4545
asset_ext: tar.gz
4646
upload_assets: false

.github/workflows/macos-release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ jobs:
1212
strategy:
1313
matrix:
1414
include:
15-
- { name: "macOS Intel (x64)", platform: darwin, os: macos-13, arch: x64, asset_ext: tar.gz }
16-
- { name: "macOS Apple Silicon (arm64)", platform: darwin, os: macos-14, arch: arm64, asset_ext: tar.gz }
15+
- { name: "macOS Intel (x64)", platform: darwin, os: macos-15, arch: x64, asset_ext: tar.gz }
16+
- { name: "macOS Apple Silicon (arm64)", platform: darwin, os: macos-15, arch: arm64, asset_ext: tar.gz }
1717

1818
uses: ./.github/workflows/macos-build.yml
1919
secrets: inherit

.github/workflows/win-build.yml

Lines changed: 10 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@ on:
1313
upload_assets:
1414
type: boolean
1515
required: true
16-
upload_url:
17-
type: string
18-
required: false
1916

2017
jobs:
2118
build-windows:
@@ -87,7 +84,6 @@ jobs:
8784
ctest --test-dir build --output-on-failure -C Release
8885
8986
- name: Run Integration Tests
90-
if: inputs.run_integration_tests == true
9187
shell: pwsh
9288
run: ./test/integration/run_test.bat
9389

@@ -135,8 +131,8 @@ jobs:
135131
Copy-Item "dist\lib\jres_solver.lib" -Destination "$pkg\lib\"
136132
}
137133
138-
# Specific Header
139-
Copy-Item "dist\include\jres_solver\jres_solver.hpp" -Destination "$pkg\include\jres_solver\"
134+
# Public Headers
135+
Copy-Item "dist\include\jres_solver\*.hpp" -Destination "$pkg\include\jres_solver\"
140136
141137
# Zip the package folder
142138
$assetPath = "$env:ASSET_NAME"
@@ -158,24 +154,13 @@ jobs:
158154
# ---------------------------------------------------------
159155
# Upload Release Assets
160156
# ---------------------------------------------------------
161-
- name: Upload Release Asset (Zip)
162-
if: inputs.upload_assets == true
163-
uses: actions/upload-release-asset@v1
164-
env:
165-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
166-
with:
167-
upload_url: ${{ inputs.upload_url }}
168-
asset_path: ./${{ env.ASSET_NAME }}
169-
asset_name: ${{ env.ASSET_NAME }}
170-
asset_content_type: application/zip
171-
172-
- name: Upload Release Asset (Checksum)
157+
- name: Upload Release Assets
173158
if: inputs.upload_assets == true
174-
uses: actions/upload-release-asset@v1
159+
shell: pwsh
175160
env:
176-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
177-
with:
178-
upload_url: ${{ inputs.upload_url }}
179-
asset_path: ./${{ env.ASSET_NAME }}.sha256
180-
asset_name: ${{ env.ASSET_NAME }}.sha256
181-
asset_content_type: text/plain
161+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
162+
run: |
163+
gh release upload "${{ inputs.version }}" `
164+
"${{ env.ASSET_NAME }}" `
165+
"${{ env.ASSET_NAME }}.sha256" `
166+
--clobber

.github/workflows/win-ci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,3 @@ jobs:
2626
with:
2727
version: ${{ github.ref_name }}
2828
upload_assets: false
29-
upload_url: ""

.github/workflows/win-release.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,3 @@ jobs:
1515
version: ${{ github.ref_name }}
1616
arch: 'x64'
1717
upload_assets: true
18-
upload_url: ${{ github.event.release.upload_url }}

0 commit comments

Comments
 (0)