|
13 | 13 | branches: |
14 | 14 | - v2 |
15 | 15 | jobs: |
16 | | - build-linux: |
17 | | - strategy: |
18 | | - fail-fast: false |
19 | | - matrix: |
20 | | - platform: [ 'amd64', 'arm64' ] |
21 | | - runs-on: self-hosted |
22 | | - steps: |
23 | | - - uses: actions/checkout@v4 |
24 | | - - name: Configure QEMU |
25 | | - uses: docker/setup-qemu-action@v3 |
26 | | - - name: Configure docker |
27 | | - uses: docker/setup-buildx-action@v3 |
28 | | - with: |
29 | | - platforms: ${{ matrix.platform }} |
30 | | - - name: Expose GitHub Runtime |
31 | | - uses: crazy-max/ghaction-github-runtime@v3 |
32 | | - - name: Build sources |
33 | | - run: | |
34 | | - echo "${{ secrets.GITHUB_TOKEN }}" > TOKEN |
35 | | - docker buildx build --secret id=github-token,src=./TOKEN --cache-to type=gha,mode=max,scope=${{ matrix.platform }} --cache-from type=gha,scope=${{ matrix.platform }} --pull --load --platform linux/${{ matrix.platform }} --target cli-base-alpine -t builder . |
36 | | - - name: Copy build |
37 | | - run: | |
38 | | - docker create --name builder builder |
39 | | - docker cp builder:/go/src/app/cli/dist/dphp bin/dphp |
40 | | - - name: Archive artifacts |
41 | | - uses: actions/upload-artifact@v4 |
42 | | - with: |
43 | | - name: dphp-${{ runner.os }}-${{ matrix.platform }} |
44 | | - path: bin/dphp |
45 | 16 | build-docker: |
46 | 17 | runs-on: self-hosted |
47 | 18 | outputs: |
@@ -108,53 +79,6 @@ jobs: |
108 | 79 | builder: ${{ steps.buildx.outputs.name }} |
109 | 80 | cache-from: type=gha,scope=image |
110 | 81 | platforms: linux/amd64 |
111 | | - build-osx: |
112 | | - strategy: |
113 | | - fail-fast: false |
114 | | - matrix: |
115 | | - platform: [ 'arm64', 'x86_64' ] |
116 | | - runs-on: ${{ matrix.platform == 'arm64' && 'macos-14' || 'macos-13' }} |
117 | | - env: |
118 | | - HOMEBREW_NO_AUTO_UPDATE: 1 |
119 | | - steps: |
120 | | - - uses: actions/checkout@v4 |
121 | | - - uses: actions/setup-go@v5 |
122 | | - with: |
123 | | - cache-dependency-path: cli/go.sum |
124 | | - go-version-file: cli/go.mod |
125 | | - - name: Configure Version |
126 | | - run: | |
127 | | - if [ "${GITHUB_REF_TYPE}" == "tag" ]; then |
128 | | - export VERSION=${GITHUB_REF_NAME:1} |
129 | | - else |
130 | | - export VERSION=${GITHUB_SHA} |
131 | | - fi |
132 | | -
|
133 | | - echo "VERSION=${VERSION}" >> "${GITHUB_ENV}" |
134 | | - - name: Configure cache |
135 | | - uses: actions/cache@v4 |
136 | | - with: |
137 | | - path: dist |
138 | | - key: ${{ matrix.platform }}-${{ hashFiles('cli/*.mod') }} |
139 | | - - name: Run doctor |
140 | | - run: | |
141 | | - export GITHUB_TOKEN "${{ secrets.GITHUB_TOKEN }}" |
142 | | - BUILD=no cli/build-php.sh |
143 | | - - name: Build php |
144 | | - run: | |
145 | | - export GITHUB_TOKEN "${{ secrets.GITHUB_TOKEN }}" |
146 | | - cli/build-php.sh |
147 | | - - name: Build cli |
148 | | - run: | |
149 | | - export GITHUB_TOKEN "${{ secrets.GITHUB_TOKEN }}" |
150 | | - cd cli && ./build.sh |
151 | | - - run: ls -lah cli/dist/ |
152 | | - - run: ls -lah dist/ || true |
153 | | - - name: Archive artifacts |
154 | | - uses: actions/upload-artifact@v4 |
155 | | - with: |
156 | | - name: dphp-${{ runner.os }}-${{ matrix.platform }} |
157 | | - path: cli/dist/dphp |
158 | 82 | performance-test: |
159 | 83 | name: Performance Test |
160 | 84 | needs: |
|
0 commit comments