firstci/.github/workflows/main.yml

63 lines
1.6 KiB
YAML
Raw Permalink Normal View History

2021-09-21 08:50:12 -07:00
name: main
on:
2021-09-21 08:51:56 -07:00
push:
branches:
- master
tags:
- '*'
2021-09-21 08:50:12 -07:00
jobs:
2021-09-21 08:51:56 -07:00
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
2021-09-21 08:50:12 -07:00
2021-09-21 08:51:56 -07:00
- name: Install dependencies
run: |
sudo apt-get update
2021-11-08 08:04:32 -08:00
sudo apt-get install -y --no-install-recommends libpng-dev g++ ccache
2021-09-21 08:50:12 -07:00
2021-11-08 08:04:32 -08:00
# probably bad example, doesn't work with my program
2021-09-22 04:36:43 -07:00
- name: ccache
uses: hendrikmuhs/ccache-action@v1
with:
key: g++_ubuntu_20.04
max-size: 50M
2021-09-21 08:51:56 -07:00
- name: Build
run: |
2021-09-22 04:36:43 -07:00
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
2021-09-21 08:51:56 -07:00
make -j "$(nproc)"
2021-09-21 08:50:12 -07:00
2021-09-21 08:51:56 -07:00
- name: Install
run: |
make install DESTDIR="/tmp/firstci"
2021-09-21 08:50:12 -07:00
2021-09-21 08:51:56 -07:00
- name: Package
run: |
2021-09-21 08:52:57 -07:00
mkdir -p upload
mv /tmp/firstci upload
2021-09-21 08:50:12 -07:00
2021-09-21 08:51:56 -07:00
- uses: actions/upload-artifact@v2
with:
name: "executable"
2021-09-21 09:09:13 -07:00
path: upload/firstci/bin/png_percept_down
2021-11-08 08:37:59 -08:00
#~ upload:
#~ name: Make Release and upload Artifacts
#~ needs:
#~ - build
#~ runs-on: ubuntu-20.04
#~ steps:
#~ - uses: actions/download-artifact@v2
#~ - name: Show artifact files
#~ run: |
#~ ls -alFR
#~ - name: Make Release and upload Artifacts
#~ env:
#~ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
#~ run: |
#~ wget -q https://github.com/TheAssassin/pyuploadtool/releases/download/continuous/pyuploadtool-x86_64.AppImage
#~ chmod +x pyuploadtool-x86_64.AppImage
#~ ./pyuploadtool-x86_64.AppImage **/png_percept_down