-
Notifications
You must be signed in to change notification settings - Fork 168
89 lines (76 loc) · 2.4 KB
/
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
name: Build
on: workflow_dispatch
jobs:
setup:
name: Setup
runs-on: ubuntu-latest
steps:
- name: Checkout project
id: checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Cache src
id: cache-src
uses: actions/upload-artifact@v2
with:
name: repo
path: ./*
build_arm64v8:
needs: setup
name: build for arm64v8
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v2
with:
name: repo
path: ./
- name: Setup
run: |
chmod +wr . -R
chmod +x ./**/*.sh
chmod +x ./**/*.pl
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: linux/arm64
- name: Set up Docker Buildx
id: docker_buildx
uses: docker/setup-buildx-action@v2
- name: Build in Docker
id: build
run: |
docker buildx build --platform linux/arm64 --builder ${{ steps.docker_buildx.outputs.name}} -t figma-linux-artefacts-arm:latest --load -f ./docker/Build_artefacts_arm64v8 .
mkdir -p ./build/installers
docker cp $(docker create figma-linux-artefacts-arm:latest)://usr/src/figma-linux/build/installers/. ./build/installers
- name: Cache arm64v8 artifacts
id: cache-arm64v8-artifacts
uses: actions/upload-artifact@v2
with:
path: build/installers/*
build_amd64:
runs-on: ubuntu-latest
name: build for amd64
needs: setup
steps:
- uses: actions/download-artifact@v2
with:
name: repo
path: ./
- name: Setup
run: |
chmod +wr . -R
chmod +x ./**/*.sh
chmod +x ./**/*.pl
- name: Build in Docker
id: build
run: |
docker build -t figma-linux-artefacts -f "./docker/Build_artefacts_local" --build-arg USER_ID=$(id -u) --build-arg GROUP_ID=$(id -g) .
mkdir -p ./build/installers
docker cp $(docker create figma-linux-artefacts:latest)://usr/src/figma-linux/build/installers/. ./build/installers
mv ./build/installers/figma-linux_$(cat build/installers/version)_linux_x64.zip ./build/installers/figma-linux_$(cat build/installers/version)_linux_amd64.zip
- name: Cache amd64 artifacts
id: cache-amd64-artifacts
uses: actions/upload-artifact@v2
with:
path: build/installers/*