-
-
Notifications
You must be signed in to change notification settings - Fork 1
119 lines (114 loc) · 3.59 KB
/
compiler.yml
File metadata and controls
119 lines (114 loc) · 3.59 KB
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
name: Docker CC
on:
push:
paths:
- compiler/images/*.Dockerfile
- .github/workflows/compiler.yml
pull_request:
paths:
- compiler/images/*.Dockerfile
- .github/workflows/compiler.yml
env:
CI_REGISTRY_IMAGE: ghcr.io/dappserver/compiler
jobs:
compile:
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.12.1
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v3
with:
install: true
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- uses: docker/build-push-action@v5
with:
push: true
context: compiler/src
cache-from: type=gha
cache-to: type=gha,mode=max
tags: lthn/build:compile,${{ env.CI_REGISTRY_IMAGE }}:compile
file: compiler/images/compile.Dockerfile
sources:
runs-on: ubuntu-latest
needs: compile
strategy:
max-parallel: 1
matrix:
os: [osx, linux, win]
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.12.1
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v3
with:
install: true
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- uses: docker/build-push-action@v5
with:
push: true
context: compiler/src
build-args:
BUILD:${{ matrix.os }}
cache-from: type=gha
cache-to: type=gha,mode=max
tags: lthn/build:sources-${{ matrix.os }},${{ env.CI_REGISTRY_IMAGE}}:sources-${{ matrix.os }}
file: compiler/images/sources.Dockerfile
depends:
runs-on: ubuntu-latest
needs: sources
strategy:
fail-fast: false
matrix:
arch: [
x86_64-apple-darwin11, x86_64-w64-mingw32, x86_64-unknown-linux-gnu, x86_64-unknown-freebsd,
arm-linux-gnueabihf, aarch64-linux-gnu, riscv64-linux-gnu, arm-linux-android, aarch64-linux-android
]
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.12.1
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v3
with:
install: true
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- uses: docker/build-push-action@v5
with:
push: true
context: compiler/src
build-args:
BUILD:{{ matrix.arch }}
cache-from: type=gha
cache-to: type=gha,mode=max
tags: lthn/build:depends-${{ matrix.arch }},${{ env.CI_REGISTRY_IMAGE }}:depends-${{ matrix.arch }}
file: compiler/images/depends.Dockerfile