Skip to content

Commit 7469237

Browse files
committed
Merge branch 'master' into develop
2 parents f0eb6d7 + 0af88f5 commit 7469237

145 files changed

Lines changed: 2170 additions & 3354 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/main.yml

100755100644
Lines changed: 87 additions & 148 deletions
Original file line numberDiff line numberDiff line change
@@ -1,148 +1,87 @@
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

.github/workflows/package.yml

Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
1+
name: package
2+
on:
3+
push:
4+
branches: [master]
5+
6+
jobs:
7+
Package:
8+
strategy:
9+
fail-fast: false
10+
matrix:
11+
os: [ubuntu-latest, windows-latest, macos-latest]
12+
runs-on: ${{ matrix.os }}
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v3
16+
17+
- uses: Aidan63/setup-haxe@3d3101bcd0a2001699fc8295f4d9eddd0724d3e9
18+
with:
19+
haxe-version: 4.3.4
20+
21+
- name: Set Haxelib
22+
run: |
23+
haxe -version
24+
haxelib dev hxcpp .
25+
26+
- name: Set Version
27+
run: haxe -cp tools/version --run Write ${{github.run_number}} > version.env
28+
29+
30+
- name: Build Tool
31+
run: |
32+
cd tools/hxcpp
33+
haxe compile.hxml
34+
35+
36+
- name: Check XCode
37+
if: startsWith(matrix.os,'macos')
38+
run: xcode-select -p
39+
40+
- name: Build Cppia
41+
run: |
42+
cd project
43+
haxe compile-cppia.hxml -D HXCPP_M64
44+
45+
- name: Clean Project
46+
if: startsWith(matrix.os,'ubuntu')
47+
run: |
48+
rm -rf project/cppia_bin
49+
50+
- name: Archive Linux Results
51+
if: startsWith(matrix.os,'ubuntu')
52+
uses: actions/upload-artifact@v3
53+
with:
54+
name: linux-64
55+
path: |
56+
bin/Linux64/Cppia
57+
tools
58+
toolchain
59+
version.env
60+
src
61+
run.n
62+
include
63+
hxcpp.n
64+
haxelib.json
65+
Changes.md
66+
hxcpp
67+
test
68+
docs
69+
project
70+
README.md
71+
build-tool
72+
java
73+
haxelib.xml
74+
LICENSE.txt
75+
76+
- name: Archive Windows Results
77+
if: startsWith(matrix.os,'windows')
78+
uses: actions/upload-artifact@v3
79+
with:
80+
name: windows-64
81+
path: |
82+
bin/Windows64/Cppia.exe
83+
84+
- name: Archive Mac Results
85+
if: startsWith(matrix.os,'macos')
86+
uses: actions/upload-artifact@v3
87+
with:
88+
name: mac-64
89+
path: |
90+
bin/Mac64/Cppia
91+
92+
Release:
93+
needs: Package
94+
runs-on: ubuntu-latest
95+
steps:
96+
- name: Download Linux
97+
uses: actions/download-artifact@v3
98+
with:
99+
name: linux-64
100+
path: hxcpp
101+
102+
- name: Download Mac
103+
uses: actions/download-artifact@v3
104+
with:
105+
name: mac-64
106+
path: hxcpp/bin/Mac64/
107+
108+
- name: Download Windows
109+
uses: actions/download-artifact@v3
110+
with:
111+
name: windows-64
112+
path: hxcpp/bin/Windows64/
113+
114+
- name: List Files
115+
run: ls -R
116+
117+
- name: Get Version
118+
run: |
119+
cat hxcpp/version.env
120+
cat hxcpp/version.env >> $GITHUB_ENV
121+
rm hxcpp/version.env
122+
123+
- name: Zip release
124+
run: |
125+
mv hxcpp hxcpp-${{ env.hxcpp_release }}
126+
zip -r hxcpp-${{ env.hxcpp_release }}.zip hxcpp-${{ env.hxcpp_release }}
127+
128+
- name: Create Release
129+
id: create_release
130+
uses: actions/create-release@v1
131+
env:
132+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
133+
with:
134+
tag_name: v${{ env.hxcpp_release }}
135+
release_name: Release ${{ env.hxcpp_release }}
136+
draft: false
137+
prerelease: false
138+
139+
- name: Upload Release Asset
140+
id: upload-release-asset
141+
uses: actions/upload-release-asset@v1
142+
env:
143+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
144+
with:
145+
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
146+
asset_path: ./hxcpp-${{ env.hxcpp_release }}.zip
147+
asset_name: hxcpp-${{ env.hxcpp_release }}.zip
148+
asset_content_type: application/zip

0 commit comments

Comments
 (0)