Skip to content

accesskit_unix: v0.5.2 #32

accesskit_unix: v0.5.2

accesskit_unix: v0.5.2 #32

Workflow file for this run

on:
release:
types:
- published
name: Publish bindings
jobs:
build-binaries:
if: startsWith(github.ref_name, 'accesskit_c-v')
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: macOS-latest
target: aarch64-apple-darwin
cmake-options: -DCMAKE_OSX_ARCHITECTURES=arm64
path: macos/arm64
- os: macOS-latest
target: x86_64-apple-darwin
path: macos/x86_64
- os: windows-2019
target: aarch64-pc-windows-msvc
setup-step: 'cmd.exe /k "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsamd64_x86.bat" `& powershell'
cmake-options: -A ARM64
path: windows/arm64/msvc
- os: windows-2019
target: i686-pc-windows-msvc
setup-step: 'cmd.exe /k "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars32.bat" `& powershell'
cmake-options: -A Win32
path: windows/x86/msvc
- os: windows-2019
target: x86_64-pc-windows-msvc
setup-step: 'cmd.exe /k "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat" `& powershell'
path: windows/x86_64/msvc
- os: ubuntu-latest
target: i686-pc-windows-gnu
setup-step: sudo apt update && sudo apt install -y mingw-w64
cmake-options: -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_SYSTEM_PROCESSOR=x86 -DCMAKE_C_COMPILER=i686-w64-mingw32-gcc -DCMAKE_CXX_COMPILER=i686-w64-mingw32-g++
path: windows/x86/mingw
- os: ubuntu-latest
target: x86_64-pc-windows-gnu
setup-step: sudo apt update && sudo apt install -y mingw-w64
cmake-options: -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_SYSTEM_PROCESSOR=x86_64 -DCMAKE_C_COMPILER=x86_64-w64-mingw32-gcc -DCMAKE_CXX_COMPILER=x86_64-w64-mingw32-g++
path: windows/x86_64/mingw
- os: ubuntu-latest
target: i686-unknown-linux-gnu
setup-step: sudo apt update && sudo apt install -y gcc-multilib g++-multilib
cmake-options: -DCMAKE_SYSTEM_NAME=Linux -DCMAKE_SYSTEM_PROCESSOR=x86
path: linux/x86
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
path: linux/x86_64
name: Build
steps:
- uses: actions/checkout@v3
- name: install stable toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
target: ${{ matrix.target }}
- name: build libraries
run: |
${{ matrix.setup-step || '' }}
cmake -S bindings/c -B build -DACCESSKIT_BUILD_HEADERS=OFF -DRust_CARGO_TARGET=${{ matrix.target }} ${{ matrix.cmake-options || '' }} ${{ !contains(matrix.target, 'msvc') && '-DCMAKE_BUILD_TYPE=Release' || '' }}
cmake --build build ${{ contains(matrix.target, 'msvc') && '--config Release' || '' }}
cmake --install build ${{ contains(matrix.target, 'msvc') && '--config Release' || '' }}
- name: Upload binaries
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.target }}
path: bindings/c/lib
generate-headers:
if: startsWith(github.ref_name, 'accesskit_c-v')
uses: AccessKit/accesskit/.github/workflows/generate-headers.yml@main
publish:
needs: [build-binaries, generate-headers]
runs-on: ubuntu-latest
name: Publish
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
path: artifacts
- run: |
mkdir -p accesskit_c/lib
mv artifacts/headers accesskit_c/include
cp -r artifacts/*/* accesskit_c/lib
cp -r bindings/c/examples accesskit_c/
cp bindings/c/accesskit*.cmake accesskit_c/
cp bindings/c/*.md accesskit_c/
cp LICENSE* accesskit_c/
mv accesskit_c ${{ github.ref_name }}
zip -r ${{ github.ref_name }}.zip ${{ github.ref_name }}
- uses: AButler/upload-release-assets@v2.0
with:
files: ${{ github.ref_name }}.zip
repo-token: ${{ secrets.GITHUB_TOKEN }}
release-tag: ${{ github.ref_name }}