mirror of
https://github.com/Alcaro/Flips.git
synced 2026-03-21 17:45:09 -05:00
93 lines
2.5 KiB
YAML
93 lines
2.5 KiB
YAML
name: Build optimized
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
linux:
|
|
runs-on: ubuntu-latest
|
|
container: ghcr.io/pyca/cryptography-manylinux_2_28:x86_64
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
filter: tree:0
|
|
- name: Dependencies
|
|
run: dnf install -y gtk3-devel zip
|
|
- name: Workaround for https://github.com/actions/runner/issues/2033
|
|
run: chown -R $(id -u):$(id -g) $PWD
|
|
- name: Build
|
|
run: ./make-linux.sh
|
|
- name: Upload Artifacts
|
|
uses: actions/upload-artifact@v4.3.1
|
|
with:
|
|
name: linux-x64-gui.zip
|
|
path: ./flips
|
|
|
|
windows:
|
|
runs-on: windows-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
filter: tree:0
|
|
- name: Build
|
|
run: bash ./make-windows.sh
|
|
- name: Upload Artifacts
|
|
uses: actions/upload-artifact@v4.3.1
|
|
with:
|
|
name: windows-x64-gui.zip
|
|
path: ./flips.exe
|
|
|
|
macos:
|
|
runs-on: macos-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
filter: tree:0
|
|
- name: Dependencies
|
|
run: brew install gtk+3 libomp llvm
|
|
- name: Build
|
|
run: CXX=/opt/homebrew/opt/llvm/bin/clang++ TARGET=gtk ./make-macos.sh
|
|
- name: Upload Artifacts
|
|
uses: actions/upload-artifact@v4.3.1
|
|
with:
|
|
name: macos-m1-gui.zip
|
|
path: ./flips
|
|
|
|
create-release:
|
|
runs-on: ubuntu-latest
|
|
needs: [linux, windows, macos]
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
filter: tree:0
|
|
- name: Download binaries
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
path: builds/
|
|
- name: Find Flips version
|
|
id: flips_version
|
|
run: echo version=$(git rev-list --count master) >> $GITHUB_OUTPUT
|
|
- name: Create zips
|
|
run: |
|
|
mv builds/linux-x64-gui.zip/flips flips
|
|
zip -9 ./flips-linux.zip flips COPYING COPYING.gpl3
|
|
mv builds/windows-x64-gui.zip/flips.exe flips.exe
|
|
zip -9 ./flips-windows.zip flips.exe COPYING COPYING.gpl3
|
|
#mv builds/macos-m1-gui.zip/flips flips-mac
|
|
#zip -9 ./flips-macos.zip flips-mac COPYING COPYING.gpl3
|
|
- name: Upload GitHub Release
|
|
uses: svenstaro/upload-release-action@2.9.0
|
|
with:
|
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
|
file: flips-*.zip
|
|
file_glob: true
|
|
tag: v${{ steps.flips_version.outputs.version }}
|
|
body: "A release of commit ${{ github.sha }}."
|