Skip to content

update debug env

update debug env #14

Workflow file for this run

name: Release
on:
push:
tags:
- "v*"
workflow_dispatch:
permissions:
contents: write
jobs:
build:
strategy:
matrix:
os: [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: 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
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.4.0_6/curl-8.4.0_6-win64-mingw.zip -O curl.zip && unzip curl.zip && mv curl-8.4.0_6-win64-mingw/bin/libcurl-x64.dll output/libcurl.dll
zip -r -j lpac-windows-x86_64.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.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.zip
build/lpac-linux-x86_64.tar.gz
build/lpac-macos-universal.zip