diff options
| author | Yong He <yonghe@outlook.com> | 2022-09-28 13:42:40 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-09-28 13:42:40 -0700 |
| commit | eb5c6b93543ca1423117045dbbfee0b6f653d392 (patch) | |
| tree | bef912602dc22b2ac624eb5630450d8303e43e0f /.github | |
| parent | 7708d205cb186f2b95d8daa2d8e0c655488fc34a (diff) | |
Make github CI build aarch64 binaries on release. (#2417)
Diffstat (limited to '.github')
| -rw-r--r-- | .github/workflows/linux.yml | 1 | ||||
| -rw-r--r-- | .github/workflows/macos.yml | 2 | ||||
| -rw-r--r-- | .github/workflows/release-linux.yml | 2 | ||||
| -rw-r--r-- | .github/workflows/release-macos.yml | 30 | ||||
| -rw-r--r-- | .github/workflows/release-windows.yml | 13 | ||||
| -rw-r--r-- | .github/workflows/windows.yml | 7 |
6 files changed, 29 insertions, 26 deletions
diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index ebc658792..3d7ceee8b 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -25,6 +25,7 @@ jobs: CC=${{matrix.compiler}} CONFIGURATION=${{matrix.configuration}} ARCH=${{matrix.platform}} + TARGETARCH=${{matrix.platform}} if [[ "$CC" == "clang" ]]; then CFLAGS=-Werror CPPFLAGS=-Werror diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index a10467f06..68214d525 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -16,7 +16,6 @@ jobs: configuration: ['release'] # 'debug' compiler: ['clang'] platform: ['x64'] - steps: - uses: actions/checkout@v2.3.4 with: @@ -27,6 +26,7 @@ jobs: CC=${{matrix.compiler}} CONFIGURATION=${{matrix.configuration}} ARCH=${{matrix.platform}} + TARGETARCH=${{matrix.platform}} CPPFLAGS=-Werror CFLAGS=-Werror CXXFLAGS=-Werror diff --git a/.github/workflows/release-linux.yml b/.github/workflows/release-linux.yml index c3d075d01..f0e00d77f 100644 --- a/.github/workflows/release-linux.yml +++ b/.github/workflows/release-linux.yml @@ -15,6 +15,7 @@ jobs: configuration: ['release'] compiler: ['gcc'] platform: ['x64'] + targetPlatform: ['x64'] steps: - name: Checkout code uses: actions/checkout@v2 @@ -28,6 +29,7 @@ jobs: export CC=${{matrix.compiler}} export CONFIGURATION=${{matrix.configuration}} export ARCH=${{matrix.platform}} + export TARGETARCH=${{matrix.targetPlatform}} echo "building..." source ./github_build.sh echo "creating binary archieves..." diff --git a/.github/workflows/release-macos.yml b/.github/workflows/release-macos.yml index 1c8a33dd8..663230f5f 100644 --- a/.github/workflows/release-macos.yml +++ b/.github/workflows/release-macos.yml @@ -15,7 +15,23 @@ jobs: configuration: ['release'] # 'debug' compiler: ['clang'] platform: ['x64'] + targetPlatform: ['x64', 'aarch64'] steps: + - name: Checkout code + uses: actions/checkout@v2 + with: + submodules: 'true' + fetch-depth: '0' + - name: Build release project + id: build + run: | + echo "starting to build..." + export CC=${{matrix.compiler}} + export CONFIGURATION=${{matrix.configuration}} + export ARCH=${{matrix.platform}} + export TARGETARCH=${{matrix.targetPlatform}} + echo "building..." + source ./github_macos_build.sh - name: "Import signing certificate" env: BUILD_CERTIFICATE_BASE64: ${{ secrets.BUILD_CERTIFICATE_BASE64 }} @@ -45,20 +61,6 @@ jobs: brew install mitchellh/gon/gon security find-identity -v brew install coreutils - - name: Checkout code - uses: actions/checkout@v2 - with: - submodules: 'true' - fetch-depth: '0' - - name: Build release project - id: build - run: | - echo "starting to build..." - export CC=${{matrix.compiler}} - export CONFIGURATION=${{matrix.configuration}} - export ARCH=${{matrix.platform}} - echo "building..." - source ./github_macos_build.sh - name: Sign binaries env: IDENTITY_ID: d6ada82a113e4204aaad914e1013e9548ffd30d0 diff --git a/.github/workflows/release-windows.yml b/.github/workflows/release-windows.yml index b3d69e57a..1b186b187 100644 --- a/.github/workflows/release-windows.yml +++ b/.github/workflows/release-windows.yml @@ -13,7 +13,7 @@ jobs: strategy: matrix: configuration: ['Release'] - platform: ['Win32', 'x64'] + platform: ['Win32', 'x64', 'aarch64'] steps: - uses: actions/checkout@v2.3.4 with: @@ -22,17 +22,18 @@ jobs: - name: setup-msbuild uses: microsoft/setup-msbuild@v1 - # If we are building for aarch64 we want to build x64 first, so that all generated files are produced - name: msbuild (x64 tools) + # If we are building for ARM64 we want to build x64 first, so that all generated files are produced if: ${{ matrix.platform == 'aarch64' }} run: | - .\premake.bat vs2017 --arch=x64 --ignore-deps=slang-llvm,slang-glslang --no-progress=true + .\premake.bat vs2019 --arch=x64 --ignore-deps=slang-llvm,slang-glslang --no-progress=true MSBuild.exe slang.sln -v:m -m -property:Configuration=Release -property:Platform=x64 -property:WindowsTargetPlatformVersion=10.0.19041.0 - + .\premake.bat vs2019 --arch=${{matrix.platform}} --ignore-deps=slang-llvm,slang-glslang --no-progress=true --skip-source-generation=true --deploy-slang-llvm=false --deploy-slang-glslang=false # Do the premake for the actual target, downloading dependencies if necessary - name: premake + if: ${{ matrix.platform != 'aarch64' }} run: - .\premake.bat vs2017 --enable-embed-stdlib=true --arch=${{matrix.platform}} --deps=true --no-progress=true + .\premake.bat vs2019 --enable-embed-stdlib=true --arch=${{matrix.platform}} --deps=true --no-progress=true - name: msbuild run: MSBuild.exe slang.sln -v:m -m -property:Configuration=${{matrix.configuration}} -property:Platform=${{matrix.platform}} -property:WindowsTargetPlatformVersion=10.0.19041.0 @@ -42,7 +43,7 @@ jobs: echo "achiving files..." if ("${{matrix.platform}}" -eq "aarch64") { - $slangDeployPlatform = "win-aarch64" + $slangDeployPlatform = "win-arm64" } elseif ("${{matrix.platform}}" -eq "x64") { diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 4fb9f0c58..e201d4613 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -22,12 +22,9 @@ jobs: fetch-depth: '0' - name: setup-msbuild uses: microsoft/setup-msbuild@v1 - - - name: premake - run: - .\premake.bat vs2017 --enable-embed-stdlib=true --arch=${{matrix.platform}} --deps=true --no-progress=true - name: build - run: + run: | + .\premake.bat vs2019 --enable-embed-stdlib=true --arch=${{matrix.platform}} --deps=true --no-progress=true MSBuild.exe slang.sln -v:m -m -property:Configuration=${{matrix.configuration}} -property:Platform=${{matrix.platform}} -property:WindowsTargetPlatformVersion=10.0.19041.0 -warnAsError - uses: actions/upload-artifact@v3 with: |
