Merge branch 'master' of https://github.com/hydrausb3/wch-ch56x-isp #56
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: Build | |
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "master" ] | |
jobs: | |
wch-isp_Ubuntu: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Install pkg-config libusb-1.0-0-dev | |
run: sudo apt-get install pkg-config libusb-1.0-0-dev | |
- name: Get build timestamp | |
id: id_date | |
shell: bash | |
run: echo "timestamp=$(date +%Y-%m-%d-%H-%M-%S)" >> $GITHUB_OUTPUT | |
- name: Get app version + timestamp | |
id: id_version | |
run: echo "app_version=$(git describe --tags HEAD)-${{steps.id_date.outputs.timestamp}}" >> $GITHUB_OUTPUT | |
- name: Build app | |
shell: bash | |
run: | | |
make | |
- name: Upload artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: wch-ch56x-isp-Ubuntu-${{steps.id_version.outputs.app_version}} | |
path: ./ | |
wch-isp_Windows: | |
runs-on: windows-latest | |
defaults: | |
run: | |
shell: msys2 {0} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- uses: msys2/setup-msys2@v2 | |
with: | |
msystem: MINGW64 | |
update: true | |
install: mingw-w64-x86_64-make mingw-w64-x86_64-pkgconf mingw-w64-x86_64-gcc mingw-w64-x86_64-libusb | |
- name: Get build timestamp | |
id: id_date | |
shell: bash | |
run: echo "timestamp=$(date +%Y-%m-%d-%H-%M-%S)" >> $GITHUB_OUTPUT | |
- name: Get app version + timestamp | |
id: id_version | |
run: echo "app_version=$(git describe --tags HEAD)-${{steps.id_date.outputs.timestamp}}" >> $GITHUB_OUTPUT | |
- name: Build app | |
run: | | |
mingw32-make | |
cp /mingw64/bin/libusb-1.0.dll ./ | |
- name: Upload artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: wch-ch56x-isp-Windows-${{steps.id_version.outputs.app_version}} | |
path: ./ |