-
-
Notifications
You must be signed in to change notification settings - Fork 3
94 lines (92 loc) · 2.89 KB
/
package-build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
name: package build
on:
push:
branches:
- master
tags:
- v*
- deploy-test*
pull_request:
branches:
- master
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
name: [
linux-x86_64,
macos-x86_64,
macos-arm64,
windows-x86_64
]
include:
- name: linux-x86_64
os: ubuntu-20.04
arch: x86_64
- name: macos-x86_64
os: macos-12
arch: x86_64
- name: macos-arm64
os: macos-14
arch: arm64
- name: windows-x86_64
os: windows-2019
arch: x86_64
fail-fast: false
steps:
- uses: actions/checkout@v2
- name: build windows
if: contains(matrix.os, 'windows')
shell: powershell
run: |
./build_windows.ps1
echo "UPLOAD_FILE=cutter-deps-qt-win-${{ matrix.arch }}.tar.gz" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
echo "UPLOAD_ASSET_TYPE=application/gzip" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: build macos
if: contains(matrix.os, 'macos')
run: |
xcode-select --print-path
make ARCH=${{ matrix.arch }} BUILD_THREADS=1
echo UPLOAD_FILE=cutter-deps-qt-macos-${{ matrix.arch }}.tar.gz >> $GITHUB_ENV
echo UPLOAD_ASSET_TYPE=application/gzip >> $GITHUB_ENV
- name: build linux outputs
if: contains(matrix.os, 'ubuntu')
run: |
sudo apt-get install \
libxcb1-dev \
libxkbcommon-dev \
libxkbcommon-x11-dev \
libgtk-3-dev \
libgl1-mesa-dev \
libglu1-mesa-dev \
libxcb-*-dev \
libclang-12-dev \
llvm-12
apt list --installed
sudo apt remove llvm-10 clang-10
make ARCH=${{ matrix.arch }}
echo UPLOAD_FILE=cutter-deps-qt-linux-${{ matrix.arch }}.tar.gz >> $GITHUB_ENV
echo UPLOAD_ASSET_TYPE=application/gzip >> $GITHUB_ENV
- uses: actions/upload-artifact@v2
if: startsWith(github.event.ref, 'refs/tags') == false
with:
name: ${{ env.UPLOAD_FILE }}
path: ${{ env.UPLOAD_FILE }}
if-no-files-found: warn
- name: Get release
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
id: get_release
uses: karliss/get-release@bee343636450eb2e9b85d9f1592d8d73c408dc74
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload release assets
if: steps.get_release.outputs.upload_url != null
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: ${{ env.UPLOAD_FILE }}
asset_name: ${{ env.UPLOAD_FILE }}
asset_content_type: ${{ env.UPLOAD_ASSET_TYPE }}