Skip to content

Free es10cex allocated memory (#33) #16

Free es10cex allocated memory (#33)

Free es10cex allocated memory (#33) #16

Workflow file for this run

name: Release
on:
push:
tags:
- "v*"
workflow_dispatch:
permissions:
contents: write
jobs:
build:
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Setup toolchain
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y libpcsclite-dev libcurl4-openssl-dev gcc make cmake gcc-mingw-w64 g++-mingw-w64 unzip
- name: Setup Cygwin
if: runner.os == 'Windows'
uses: egor-tensin/setup-cygwin@v4
with:
packages: cmake gcc-g++ make zip wget
- name: Build for Linux
if: runner.os == 'Linux'
run: |
mkdir build && cd build && cmake .. && make -j$(nproc)
chmod +x output/lpac
tar -czvf lpac-linux-x86_64.tar.gz -C output .
shell: bash
- name: Build for Windows(MinGW)
if: runner.os == 'Linux'
run: |
mkdir build-mingw && cd build-mingw && cmake -DLINUX_MINGW32=ON .. && make -j$(nproc)
wget https://curl.se/windows/dl-8.5.0_3/curl-8.5.0_3-win64-mingw.zip -O curl.zip && unzip curl.zip && mv curl-8.5.0_3-win64-mingw/bin/libcurl-x64.dll output/libcurl.dll
zip -r -j lpac-windows-x86_64-mingw.zip output/*
- name: Build for Windows(Cygwin)
if: runner.os == 'Windows'
run: |
mkdir build-cygwin && cd build-cygwin && cmake -DCYGWIN=ON .. && make
wget https://curl.se/windows/dl-8.5.0_3/curl-8.5.0_3-win64-mingw.zip -O curl.zip && unzip curl.zip && mv curl-8.5.0_3-win64-mingw/bin/libcurl-x64.dll output/libcurl.dll
cp C:\tools\cygwin\bin\cygwin1.dll output
zip -r -j lpac-windows-x86_64-cygwin.zip output/*
- name: Build for macOS
if: runner.os == 'macOS'
run: |
mkdir build && cd build && cmake .. && make -j$(sysctl -n hw.ncpu)
chmod +x output/lpac
zip -r -j lpac-macos-universal.zip output/*
shell: bash
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: build-artifacts
path: |
build-mingw/lpac-windows-x86_64-mingw.zip
build-cygwin/lpac-windows-x86_64-cygwin.zip
build/lpac-linux-x86_64.tar.gz
build/lpac-macos-universal.zip
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/v')
with:
files: |
build-mingw/lpac-windows-x86_64-mingw.zip
build-cygwin/lpac-windows-x86_64-cygwin.zip
build/lpac-linux-x86_64.tar.gz
build/lpac-macos-universal.zip