|
1 | | -name: CI |
2 | | -on: [push] |
3 | | - |
4 | | -jobs: |
5 | | - build_matrix: |
6 | | - strategy: |
7 | | - matrix: |
8 | | - os: [ubuntu-latest, windows-latest, macos-latest] |
9 | | - runs-on: ${{ matrix.os }} |
10 | | - steps: |
11 | | - - name: Checkout |
12 | | - uses: actions/checkout@v3 |
13 | | - |
14 | | - - uses: krdlab/setup-haxe@v1 |
15 | | - with: |
16 | | - haxe-version: 4.3.0 |
17 | | - |
18 | | - - name: Set Haxelib |
19 | | - run: | |
20 | | - haxe -version |
21 | | - haxelib dev hxcpp . |
22 | | - |
23 | | - - name: Set Version |
24 | | - run: haxe -cp tools/version --run Write ${{github.run_number}} > version.env |
25 | | - |
26 | | - |
27 | | - - name: Build Tool |
28 | | - run: | |
29 | | - cd tools/hxcpp |
30 | | - haxe compile.hxml |
31 | | -
|
32 | | - |
33 | | - - name: Check XCode |
34 | | - if: startsWith(matrix.os,'macos') |
35 | | - run: xcode-select -p |
36 | | - |
37 | | - - name: Build Cppia |
38 | | - run: | |
39 | | - cd project |
40 | | - haxe compile-cppia.hxml -D HXCPP_M64 |
41 | | - |
42 | | - - name: Clean Project |
43 | | - if: startsWith(matrix.os,'ubuntu') |
44 | | - run: | |
45 | | - rm -rf project/cppia_bin |
46 | | -
|
47 | | - - name: Archive Linux Results |
48 | | - if: startsWith(matrix.os,'ubuntu') |
49 | | - uses: actions/upload-artifact@v3 |
50 | | - with: |
51 | | - name: linux-64 |
52 | | - path: | |
53 | | - bin/Linux64/Cppia |
54 | | - tools |
55 | | - toolchain |
56 | | - version.env |
57 | | - src |
58 | | - run.n |
59 | | - include |
60 | | - hxcpp.n |
61 | | - haxelib.json |
62 | | - Changes.md |
63 | | - hxcpp |
64 | | - test |
65 | | - docs |
66 | | - project |
67 | | - README.md |
68 | | - build-tool |
69 | | - java |
70 | | - haxelib.xml |
71 | | - LICENSE.txt |
72 | | -
|
73 | | - - name: Archive Windows Results |
74 | | - if: startsWith(matrix.os,'windows') |
75 | | - uses: actions/upload-artifact@v3 |
76 | | - with: |
77 | | - name: windows-64 |
78 | | - path: | |
79 | | - bin/Windows64/Cppia.exe |
80 | | -
|
81 | | - - name: Archive Mac Results |
82 | | - if: startsWith(matrix.os,'macos') |
83 | | - uses: actions/upload-artifact@v3 |
84 | | - with: |
85 | | - name: mac-64 |
86 | | - path: | |
87 | | - bin/Mac64/Cppia |
88 | | - release: |
89 | | - name: Release |
90 | | - needs: build_matrix |
91 | | - runs-on: ubuntu-latest |
92 | | - steps: |
93 | | - - name: Download Linux |
94 | | - uses: actions/download-artifact@v3 |
95 | | - with: |
96 | | - name: linux-64 |
97 | | - path: hxcpp |
98 | | - |
99 | | - - name: Download Mac |
100 | | - uses: actions/download-artifact@v3 |
101 | | - with: |
102 | | - name: mac-64 |
103 | | - path: hxcpp/bin/Mac64/ |
104 | | - |
105 | | - - name: Download Windows |
106 | | - uses: actions/download-artifact@v3 |
107 | | - with: |
108 | | - name: windows-64 |
109 | | - path: hxcpp/bin/Windows64/ |
110 | | - |
111 | | - - name: List Files |
112 | | - run: ls -R |
113 | | - |
114 | | - - name: Get Version |
115 | | - run: | |
116 | | - cat hxcpp/version.env |
117 | | - cat hxcpp/version.env >> $GITHUB_ENV |
118 | | - rm hxcpp/version.env |
119 | | -
|
120 | | - - name: Zip release |
121 | | - run: | |
122 | | - mv hxcpp hxcpp-${{ env.hxcpp_release }} |
123 | | - zip -r hxcpp-${{ env.hxcpp_release }}.zip hxcpp-${{ env.hxcpp_release }} |
124 | | - |
125 | | - - name: Create Release |
126 | | - id: create_release |
127 | | - uses: actions/create-release@v1 |
128 | | - env: |
129 | | - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
130 | | - with: |
131 | | - tag_name: v${{ env.hxcpp_release }} |
132 | | - release_name: Release ${{ env.hxcpp_release }} |
133 | | - draft: false |
134 | | - prerelease: false |
135 | | - |
136 | | - - name: Upload Release Asset |
137 | | - id: upload-release-asset |
138 | | - uses: actions/upload-release-asset@v1 |
139 | | - env: |
140 | | - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
141 | | - with: |
142 | | - upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps |
143 | | - asset_path: ./hxcpp-${{ env.hxcpp_release }}.zip |
144 | | - asset_name: hxcpp-${{ env.hxcpp_release }}.zip |
145 | | - asset_content_type: application/zip |
146 | | - |
147 | | - |
148 | | - |
| 1 | +name: main |
| 2 | +on: [push, pull_request] |
| 3 | + |
| 4 | +jobs: |
| 5 | + Windows32: |
| 6 | + strategy: |
| 7 | + fail-fast: false |
| 8 | + matrix: |
| 9 | + haxe: [ 4.3.4, latest ] |
| 10 | + uses: ./.github/workflows/test.yml |
| 11 | + name: Test Windows (32bit) |
| 12 | + with: |
| 13 | + haxe: ${{ matrix.haxe }} |
| 14 | + arch: 32 |
| 15 | + sep: \ |
| 16 | + ext: .dll |
| 17 | + os: windows-latest |
| 18 | + |
| 19 | + Windows64: |
| 20 | + strategy: |
| 21 | + fail-fast: false |
| 22 | + matrix: |
| 23 | + haxe: [ 4.3.4, latest ] |
| 24 | + uses: ./.github/workflows/test.yml |
| 25 | + name: Test Windows (64bit) |
| 26 | + with: |
| 27 | + haxe: ${{ matrix.haxe }} |
| 28 | + arch: 64 |
| 29 | + sep: \ |
| 30 | + ext: .dll |
| 31 | + os: windows-latest |
| 32 | + |
| 33 | + MacOS64: |
| 34 | + strategy: |
| 35 | + fail-fast: false |
| 36 | + matrix: |
| 37 | + haxe: [ 4.3.4, latest ] |
| 38 | + uses: ./.github/workflows/test.yml |
| 39 | + name: Test MacOS (x86_64) |
| 40 | + with: |
| 41 | + haxe: ${{ matrix.haxe }} |
| 42 | + arch: 64 |
| 43 | + sep: / |
| 44 | + ext: .dylib |
| 45 | + os: macos-13 |
| 46 | + |
| 47 | + MacOSArm: |
| 48 | + strategy: |
| 49 | + fail-fast: false |
| 50 | + matrix: |
| 51 | + haxe: [ 4.3.4, latest ] |
| 52 | + uses: ./.github/workflows/test.yml |
| 53 | + name: Test MacOS (Arm64) |
| 54 | + with: |
| 55 | + haxe: ${{ matrix.haxe }} |
| 56 | + arch: Arm64 |
| 57 | + sep: / |
| 58 | + ext: .dylib |
| 59 | + os: macos-latest |
| 60 | + |
| 61 | + Linux32: |
| 62 | + strategy: |
| 63 | + fail-fast: false |
| 64 | + matrix: |
| 65 | + haxe: [ 4.3.4, latest ] |
| 66 | + uses: ./.github/workflows/test.yml |
| 67 | + name: Test Linux (32bit) |
| 68 | + with: |
| 69 | + haxe: ${{ matrix.haxe }} |
| 70 | + arch: 32 |
| 71 | + sep: / |
| 72 | + ext: .dso |
| 73 | + os: ubuntu-latest |
| 74 | + |
| 75 | + Linux64: |
| 76 | + strategy: |
| 77 | + fail-fast: false |
| 78 | + matrix: |
| 79 | + haxe: [ 4.3.4, latest ] |
| 80 | + uses: ./.github/workflows/test.yml |
| 81 | + name: Test Linux (64bit) |
| 82 | + with: |
| 83 | + haxe: ${{ matrix.haxe }} |
| 84 | + arch: 64 |
| 85 | + sep: / |
| 86 | + ext: .dso |
| 87 | + os: ubuntu-latest |
0 commit comments