Turn on ARM64EC pipeline and CLAP 1.2.2 #6
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
push: | |
tags: | |
- "v*" | |
jobs: | |
create_release: | |
name: Create release | |
runs-on: ubuntu-latest | |
outputs: | |
upload_id: ${{ steps.draft_release.outputs.id }} | |
upload_url: ${{ steps.draft_release.outputs.upload_url }} | |
steps: | |
- name: Draft release | |
id: draft_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: Release ${{ github.ref }} | |
draft: true | |
build_release: | |
name: Build ${{ matrix.name }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
include: | |
- os: ubuntu-latest | |
name: linux | |
dir_build: ./build | |
file_name: clap-info | |
run_test: true | |
- os: macos-latest | |
name: mac-universal | |
dir_build: ./build | |
file_name: clap-info | |
cmake_args: -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" | |
run_test: true | |
- os: windows-latest | |
name: win | |
dir_build: ./build/Release | |
file_name: clap-info | |
file_ext: .exe | |
cmake_args: -G"Visual Studio 17 2022" -A x64 | |
run_test: true | |
- os: windows-latest | |
name: win-arm64ec | |
dir_build: ./build/Release | |
file_name: clap-info | |
file_ext: .exe | |
cmake_args: -G"Visual Studio 17 2022" -A arm64ec -DCMAKE_SYSTEM_VERSION=10 | |
run_test: false | |
steps: | |
- name: Install Windows dependencies | |
if: matrix.os == 'windows-latest' | |
run: choco install zip | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- name: Build binary | |
run: | | |
cmake -S . -B ./build -DCMAKE_BUILD_TYPE=Release ${{ matrix.cmake_args }} | |
cmake --build ./build --config Release | |
- name: List files | |
run: ls "${{ matrix.dir_build }}" | |
- name: Test binary | |
if: ${{ matrix.run_test }} | |
run: ${{ matrix.dir_build }}/${{ matrix.file_name }}${{ matrix.file_ext }} -h | |
- name: Compress binary | |
run: | | |
cd "${{ matrix.dir_build }}" | |
zip ${{ matrix.file_name }}-${{ matrix.name }}.zip ${{ matrix.file_name }}${{ matrix.file_ext }} | |
- name: Upload binary | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ matrix.file_name }}-${{ matrix.name }}.zip | |
path: ${{ matrix.dir_build }}/${{ matrix.file_name }}-${{ matrix.name }}.zip | |
- name: Upload binary | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ needs.create_release.outputs.upload_url }} | |
asset_path: ${{ matrix.dir_build }}/${{ matrix.file_name }}-${{ matrix.name }}.zip | |
asset_name: ${{ matrix.file_name }}-${{ matrix.name }}.zip | |
asset_content_type: application/zip | |
publish_release: | |
name: Publish release | |
needs: [create_release, build_release] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: eregon/publish-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
release_id: ${{ needs.create_release.outputs.upload_id }} |