Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitHub CI #1106

Merged
merged 62 commits into from
Jun 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
d76f74b
test github ci
Aidan63 Apr 28, 2024
9d974f2
pass through haxe version
Aidan63 Apr 28, 2024
63a45ec
Use macos-13
Aidan63 Apr 28, 2024
96e2ced
better matrix config
Aidan63 Apr 28, 2024
4e42e1d
fancier test matrix
Aidan63 Apr 28, 2024
8209870
revert fancier matrix change
Aidan63 Apr 28, 2024
a38c4b0
Basic hxcpp setup
Aidan63 Apr 28, 2024
b7a14c3
First haxe test attempt
Aidan63 Apr 28, 2024
a095e46
cffi tests attempt
Aidan63 Apr 28, 2024
15aff78
Fix debug flag for build.xml based compile
Aidan63 Apr 28, 2024
9b2ee18
Fix all defines for build.xml based compile
Aidan63 Apr 28, 2024
3936b53
Remove bash specific command
Aidan63 Apr 28, 2024
3cdff4c
Try excluding macos from 32bits
Aidan63 Apr 28, 2024
abd93f1
More tests
Aidan63 Apr 28, 2024
3f9a5c8
Fix std tests
Aidan63 Apr 28, 2024
df83fcb
Fix differing output folder for std tests
Aidan63 Apr 28, 2024
53ac5cb
haxe unit test
Aidan63 Apr 28, 2024
734c73a
Use git switch
Aidan63 Apr 28, 2024
ed1cead
Try removing the escaping
Aidan63 Apr 28, 2024
b7c5af8
Use checkout action
Aidan63 Apr 28, 2024
3c693ab
try sub jobs
Aidan63 Apr 28, 2024
6b5dc36
comment out unimplemented jobs
Aidan63 Apr 28, 2024
b02b5a6
Fully qualify working directory
Aidan63 Apr 28, 2024
b3a49c5
try actual relative paths
Aidan63 Apr 28, 2024
8138272
try explicit working directory for all steps
Aidan63 Apr 28, 2024
a6934c6
try composite action
Aidan63 Apr 28, 2024
7d43d36
try hopefully correct composite action
Aidan63 Apr 28, 2024
b0a642f
cant have checkout in the setup action
Aidan63 Apr 28, 2024
f24a0b2
Fix wrong path
Aidan63 Apr 28, 2024
262b587
Fix wrong path (again...)
Aidan63 Apr 28, 2024
cb10dcf
Specify shell
Aidan63 Apr 28, 2024
1e6b201
Fix some old copy paths
Aidan63 Apr 28, 2024
cee0d80
explicit hxcpp path to composite action
Aidan63 Apr 28, 2024
73d4067
Install gcc on linux
Aidan63 Apr 28, 2024
2c23669
custom names
Aidan63 Apr 28, 2024
877796c
lets try pwsh
Aidan63 Apr 28, 2024
85fb35c
Do bring back the native lib stage though
Aidan63 Apr 28, 2024
cf54146
More custom names
Aidan63 Apr 28, 2024
fcd3544
Do cffi copy on 32bit as well
Aidan63 Apr 28, 2024
32ed6d9
build neko on 32bit as well
Aidan63 Apr 28, 2024
f74b928
try a matrix telemetry
Aidan63 Apr 28, 2024
7e4b87c
Remember setup guff
Aidan63 Apr 28, 2024
15e1ffb
Add more test jobs
Aidan63 Apr 28, 2024
1884bb0
flip around cppia file name
Aidan63 Apr 28, 2024
25976cd
add haxe tests suite job
Aidan63 Apr 28, 2024
1d36817
Restore other ci jobs
Aidan63 Apr 28, 2024
2c51203
Goodbye azure pipelines
Aidan63 Apr 28, 2024
7c1a361
Try splitting up into OS specific jobs
Aidan63 Apr 29, 2024
acc1a13
change naming again
Aidan63 Apr 29, 2024
1ac306b
Remove now un-needed intermediate workflow
Aidan63 Apr 29, 2024
ee09c52
add arch define to cffi hxml calls
Aidan63 Apr 29, 2024
bb6421c
Merge branch 'master' into github-ci
Aidan63 Apr 29, 2024
4d00261
Don't fail fast
Aidan63 Apr 29, 2024
5137631
Add pull request trigger
Aidan63 Apr 29, 2024
7b97f78
Merge branch 'master' into github-ci
Aidan63 Jun 16, 2024
e885b0f
unmask mysql service
Aidan63 Jun 16, 2024
d5c111e
Move packaging stuff into independent yml file
Aidan63 Jun 16, 2024
fa0e077
limit packaging to master instead of tags
Aidan63 Jun 16, 2024
9e3e6c1
relax packaging requirements as a test
Aidan63 Jun 16, 2024
9b3db59
specify prs as well for the test
Aidan63 Jun 16, 2024
c997895
restrict packaging to master
Aidan63 Jun 17, 2024
69a4fcd
Use setup-haxe fork and try macos-latest
Aidan63 Jun 25, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
221 changes: 73 additions & 148 deletions .github/workflows/main.yml
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,148 +1,73 @@
name: CI
on: [push]

jobs:
build_matrix:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3

- uses: krdlab/setup-haxe@v1
with:
haxe-version: 4.3.0

- name: Set Haxelib
run: |
haxe -version
haxelib dev hxcpp .

- name: Set Version
run: haxe -cp tools/version --run Write ${{github.run_number}} > version.env


- name: Build Tool
run: |
cd tools/hxcpp
haxe compile.hxml


- name: Check XCode
if: startsWith(matrix.os,'macos')
run: xcode-select -p

- name: Build Cppia
run: |
cd project
haxe compile-cppia.hxml -D HXCPP_M64

- name: Clean Project
if: startsWith(matrix.os,'ubuntu')
run: |
rm -rf project/cppia_bin

- name: Archive Linux Results
if: startsWith(matrix.os,'ubuntu')
uses: actions/upload-artifact@v3
with:
name: linux-64
path: |
bin/Linux64/Cppia
tools
toolchain
version.env
src
run.n
include
hxcpp.n
haxelib.json
Changes.md
hxcpp
test
docs
project
README.md
build-tool
java
haxelib.xml
LICENSE.txt

- name: Archive Windows Results
if: startsWith(matrix.os,'windows')
uses: actions/upload-artifact@v3
with:
name: windows-64
path: |
bin/Windows64/Cppia.exe

- name: Archive Mac Results
if: startsWith(matrix.os,'macos')
uses: actions/upload-artifact@v3
with:
name: mac-64
path: |
bin/Mac64/Cppia
release:
name: Release
needs: build_matrix
runs-on: ubuntu-latest
steps:
- name: Download Linux
uses: actions/download-artifact@v3
with:
name: linux-64
path: hxcpp

- name: Download Mac
uses: actions/download-artifact@v3
with:
name: mac-64
path: hxcpp/bin/Mac64/

- name: Download Windows
uses: actions/download-artifact@v3
with:
name: windows-64
path: hxcpp/bin/Windows64/

- name: List Files
run: ls -R

- name: Get Version
run: |
cat hxcpp/version.env
cat hxcpp/version.env >> $GITHUB_ENV
rm hxcpp/version.env

- name: Zip release
run: |
mv hxcpp hxcpp-${{ env.hxcpp_release }}
zip -r hxcpp-${{ env.hxcpp_release }}.zip hxcpp-${{ env.hxcpp_release }}

- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ env.hxcpp_release }}
release_name: Release ${{ env.hxcpp_release }}
draft: false
prerelease: false

- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
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
asset_path: ./hxcpp-${{ env.hxcpp_release }}.zip
asset_name: hxcpp-${{ env.hxcpp_release }}.zip
asset_content_type: application/zip



name: main
on: [push, pull_request]

jobs:
Windows32:
strategy:
fail-fast: false
matrix:
haxe: [ 4.3.4, latest ]
uses: ./.github/workflows/test.yml
name: Test Windows (32bit)
with:
haxe: ${{ matrix.haxe }}
arch: 32
sep: \
ext: .dll
os: windows-latest

Windows64:
strategy:
fail-fast: false
matrix:
haxe: [ 4.3.4, latest ]
uses: ./.github/workflows/test.yml
name: Test Windows (64bit)
with:
haxe: ${{ matrix.haxe }}
arch: 64
sep: \
ext: .dll
os: windows-latest

MacOS:
strategy:
fail-fast: false
matrix:
haxe: [ 4.3.4, latest ]
uses: ./.github/workflows/test.yml
name: Test MacOS
with:
haxe: ${{ matrix.haxe }}
arch: 64
sep: /
ext: .dylib
os: macos-latest

Linux32:
strategy:
fail-fast: false
matrix:
haxe: [ 4.3.4, latest ]
uses: ./.github/workflows/test.yml
name: Test Linux (32bit)
with:
haxe: ${{ matrix.haxe }}
arch: 32
sep: /
ext: .dso
os: ubuntu-latest

Linux64:
strategy:
fail-fast: false
matrix:
haxe: [ 4.3.4, latest ]
uses: ./.github/workflows/test.yml
name: Test Linux (64bit)
with:
haxe: ${{ matrix.haxe }}
arch: 64
sep: /
ext: .dso
os: ubuntu-latest
148 changes: 148 additions & 0 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
name: package
on:
push:
branches: [master]

jobs:
Package:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3

- uses: Aidan63/setup-haxe@e4b347bc45596200a68804b232be9d73f80868a6
with:
haxe-version: 4.3.4

- name: Set Haxelib
run: |
haxe -version
haxelib dev hxcpp .

- name: Set Version
run: haxe -cp tools/version --run Write ${{github.run_number}} > version.env


- name: Build Tool
run: |
cd tools/hxcpp
haxe compile.hxml


- name: Check XCode
if: startsWith(matrix.os,'macos')
run: xcode-select -p

- name: Build Cppia
run: |
cd project
haxe compile-cppia.hxml -D HXCPP_M64

- name: Clean Project
if: startsWith(matrix.os,'ubuntu')
run: |
rm -rf project/cppia_bin

- name: Archive Linux Results
if: startsWith(matrix.os,'ubuntu')
uses: actions/upload-artifact@v3
with:
name: linux-64
path: |
bin/Linux64/Cppia
tools
toolchain
version.env
src
run.n
include
hxcpp.n
haxelib.json
Changes.md
hxcpp
test
docs
project
README.md
build-tool
java
haxelib.xml
LICENSE.txt

- name: Archive Windows Results
if: startsWith(matrix.os,'windows')
uses: actions/upload-artifact@v3
with:
name: windows-64
path: |
bin/Windows64/Cppia.exe

- name: Archive Mac Results
if: startsWith(matrix.os,'macos')
uses: actions/upload-artifact@v3
with:
name: mac-64
path: |
bin/Mac64/Cppia

Release:
needs: Package
runs-on: ubuntu-latest
steps:
- name: Download Linux
uses: actions/download-artifact@v3
with:
name: linux-64
path: hxcpp

- name: Download Mac
uses: actions/download-artifact@v3
with:
name: mac-64
path: hxcpp/bin/Mac64/

- name: Download Windows
uses: actions/download-artifact@v3
with:
name: windows-64
path: hxcpp/bin/Windows64/

- name: List Files
run: ls -R

- name: Get Version
run: |
cat hxcpp/version.env
cat hxcpp/version.env >> $GITHUB_ENV
rm hxcpp/version.env

- name: Zip release
run: |
mv hxcpp hxcpp-${{ env.hxcpp_release }}
zip -r hxcpp-${{ env.hxcpp_release }}.zip hxcpp-${{ env.hxcpp_release }}

- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ env.hxcpp_release }}
release_name: Release ${{ env.hxcpp_release }}
draft: false
prerelease: false

- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
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
asset_path: ./hxcpp-${{ env.hxcpp_release }}.zip
asset_name: hxcpp-${{ env.hxcpp_release }}.zip
asset_content_type: application/zip
Loading