Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compile mac arm64 too #114

Merged
merged 6 commits into from
Nov 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 6 additions & 41 deletions .github/workflows/Release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ jobs:
with:
tag_name: ${{steps.get_release_info.outputs.tag_name}}
release_name: ${{steps.get_release_info.outputs.release_name}}
draft: true
prerelease: true
draft: false
prerelease: false

release_windows_job:
name: Release Windows
Expand All @@ -62,8 +62,8 @@ jobs:
Write-Output "::set-output name=artifact_path::$artifactPath"
- id: build
name: Build
run: CI/GitHubBuild.ps1 -Version "${{ needs.get_release_info_job.outputs.version }}" -ArtifactPath "${{ steps.get_this_release_info.outputs.artifact_path }}"
shell: pwsh
run: CI/build.sh -Version "${{ needs.get_release_info_job.outputs.version }}" -ArtifactPath "${{ steps.get_this_release_info.outputs.artifact_path }}"
shell: bash
- id: upload-release-asset
name: Upload Release Asset
uses: actions/upload-release-asset@v1
Expand Down Expand Up @@ -97,43 +97,8 @@ jobs:
Write-Output "::set-output name=artifact_path::$artifactPath"
- id: build
name: Build
run: CI/GitHubBuild.ps1 -Version "${{ needs.get_release_info_job.outputs.version }}" -ArtifactPath "${{ steps.get_this_release_info.outputs.artifact_path }}"
shell: pwsh
- id: upload-release-asset
name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.get_release_info_job.outputs.release_upload_url }}
asset_path: ${{ steps.get_this_release_info.outputs.artifact_path }}
asset_name: ${{ steps.get_this_release_info.outputs.artifact_path }}
asset_content_type: application/zip

release_ubuntu_job:
name: Release Ubuntu
runs-on: ubuntu-latest
needs: get_release_info_job
steps:
- name: Print Debug Info
shell: pwsh
run: |
Write-Host @"
Version: ${{ needs.get_release_info_job.outputs.version }}
Release Upload URL: ${{ needs.get_release_info_job.outputs.release_upload_url }}
"@
- uses: actions/checkout@v2
- id: get_this_release_info
shell: pwsh
run: |
#Requires -Version "6.1"
$osName = if ($IsWindows) { "win32" } elseif ($IsLinux) { "ubuntu" } else { "darwin" }
$artifactPath = "FBX-glTF-conv-${{ needs.get_release_info_job.outputs.version }}-$osName.zip"
Write-Output "::set-output name=artifact_path::$artifactPath"
- id: build
name: Build
run: CI/GitHubBuild.ps1 -Version "${{ needs.get_release_info_job.outputs.version }}" -ArtifactPath "${{ steps.get_this_release_info.outputs.artifact_path }}"
shell: pwsh
run: CI/build.sh -Version "${{ needs.get_release_info_job.outputs.version }}" -ArtifactPath "${{ steps.get_this_release_info.outputs.artifact_path }}"
shell: bash
- id: upload-release-asset
name: Upload Release Asset
uses: actions/upload-release-asset@v1
Expand Down
30 changes: 11 additions & 19 deletions .github/workflows/Test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ on: [pull_request]

jobs:
test:
name: Test
name: Test on Windows
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
name: Checkout

- name: Build
shell: pwsh
shell: bash
run: |
CI/GitHubBuild.ps1
CI/build.sh

- name: Run Core Test
shell: pwsh
Expand All @@ -30,13 +30,17 @@ jobs:
runs-on: macos-11
steps:
- uses: actions/checkout@v2
name: Checkout
name:

- name: Set up Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable

- name: Build
shell: pwsh
shell: bash
run: |
sudo xcode-select --switch /Applications/Xcode_14.3.1.app
CI/GitHubBuild.ps1
CI/build.sh

- name: Upload Artifacts
uses: actions/upload-artifact@v3
Expand All @@ -61,15 +65,3 @@ jobs:
chmod 777 ./out/Release/bin/FBX-glTF-conv
./out/Release/bin/FBX-glTF-conv --help

test_on_ubuntu:
name: Test on Ubuntu
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
name: Checkout

- name: Build
shell: pwsh
run: |
CI/GitHubBuild.ps1

32 changes: 23 additions & 9 deletions CI/GitHubBuild.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -137,15 +137,29 @@ foreach ($cmakeBuildType in $cmakeBuildTypes) {

$defineVersion = if ($Version) { "-DFBX_GLTF_CONV_CLI_VERSION=$Version" } else { "" }

cmake `
-DCMAKE_TOOLCHAIN_FILE="vcpkg/scripts/buildsystems/vcpkg.cmake" `
"-DCMAKE_BUILD_TYPE=$cmakeBuildType" `
-DCMAKE_INSTALL_PREFIX="$cmakeInstallPrefix/$cmakeBuildType" `
-DFbxSdkHome:STRING="$fbxSdkHome" `
"-DPOLYFILLS_STD_FILESYSTEM=$polyfillsStdFileSystem" `
"$defineVersion" `
"-S." `
"-B$cmakeBuildDir"
if ($IsMacOS) {
cmake `
-DCMAKE_TOOLCHAIN_FILE="vcpkg/scripts/buildsystems/vcpkg.cmake" `
-DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" `
"-DCMAKE_BUILD_TYPE=$cmakeBuildType" `
-DCMAKE_INSTALL_PREFIX="$cmakeInstallPrefix/$cmakeBuildType" `
-DFbxSdkHome:STRING="$fbxSdkHome" `
"-DPOLYFILLS_STD_FILESYSTEM=$polyfillsStdFileSystem" `
"$defineVersion" `
"-S." `
"-B$cmakeBuildDir"
}
else {
cmake `
-DCMAKE_TOOLCHAIN_FILE="vcpkg/scripts/buildsystems/vcpkg.cmake" `
"-DCMAKE_BUILD_TYPE=$cmakeBuildType" `
-DCMAKE_INSTALL_PREFIX="$cmakeInstallPrefix/$cmakeBuildType" `
-DFbxSdkHome:STRING="$fbxSdkHome" `
"-DPOLYFILLS_STD_FILESYSTEM=$polyfillsStdFileSystem" `
"$defineVersion" `
"-S." `
"-B$cmakeBuildDir"
}

# The build type really matters:
# https://stackoverflow.com/questions/24460486/cmake-build-type-is-not-being-used-in-cmakelists-txt
Expand Down
Loading
Loading