Skip to content

chore(main): release 0.14.0 (#18) #3

chore(main): release 0.14.0 (#18)

chore(main): release 0.14.0 (#18) #3

Workflow file for this run

on:
push:
tags:
- '*.*'
name: Publish C bindings
jobs:
build-binaries:
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
cmake-options: -DCMAKE_OSX_ARCHITECTURES=x86_64
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@v4
- name: install stable toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
target: ${{ matrix.target }}
- name: build libraries
run: |
${{ matrix.setup-step || '' }}
cmake -S . -B build -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@v4
with:
name: ${{ matrix.target }}
path: lib
publish:
needs: [build-binaries]
runs-on: ubuntu-latest
name: Publish
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
path: artifacts
- run: |
mkdir -p accesskit-c/lib
cp -r artifacts/*/* accesskit-c/lib
cp -r .cargo examples include src accesskit-c/
cp accesskit*.cmake CMakeLists.txt accesskit-c/
cp Cargo.* accesskit-c/
cp cbindgen.toml .clang-format accesskit-c/
cp *.md accesskit-c/
cp AUTHORS LICENSE* accesskit-c/
mv accesskit-c accesskit-c-${{ github.ref_name }}
zip -r accesskit-c-${{ github.ref_name }}.zip accesskit-c-${{ github.ref_name }}
- uses: AButler/[email protected]
with:
files: accesskit-c-${{ github.ref_name }}.zip
repo-token: ${{ secrets.GITHUB_TOKEN }}
release-tag: ${{ github.ref_name }}