|
@@ -229,10 +229,8 @@ jobs:
|
|
path: out
|
|
path: out
|
|
|
|
|
|
|
|
|
|
- linux-build:
|
|
|
|
|
|
+ linux-amd64-build:
|
|
runs-on: ubuntu-18.04
|
|
runs-on: ubuntu-18.04
|
|
- env:
|
|
|
|
- OPAMYES: 1
|
|
|
|
steps:
|
|
steps:
|
|
- name: Login to GitHub Container Registry
|
|
- name: Login to GitHub Container Registry
|
|
uses: docker/login-action@v1
|
|
uses: docker/login-action@v1
|
|
@@ -242,7 +240,7 @@ jobs:
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
|
|
- name: Install Earthly
|
|
- name: Install Earthly
|
|
- run: sudo /bin/sh -c 'wget https://github.com/earthly/earthly/releases/latest/download/earthly-linux-amd64 -O /usr/local/bin/earthly && chmod +x /usr/local/bin/earthly && /usr/local/bin/earthly bootstrap --with-autocomplete'
|
|
|
|
|
|
+ run: sudo /bin/sh -c 'wget https://github.com/earthly/earthly/releases/download/v0.6.2/earthly-linux-amd64 -O /usr/local/bin/earthly && chmod +x /usr/local/bin/earthly && /usr/local/bin/earthly bootstrap --with-autocomplete'
|
|
|
|
|
|
- uses: actions/checkout@main
|
|
- uses: actions/checkout@main
|
|
with:
|
|
with:
|
|
@@ -253,20 +251,12 @@ jobs:
|
|
run: echo "ADD_REVISION=1" >> $GITHUB_ENV
|
|
run: echo "ADD_REVISION=1" >> $GITHUB_ENV
|
|
|
|
|
|
- name: Build
|
|
- name: Build
|
|
- run: earthly --platform=linux/amd64 --remote-cache=ghcr.io/$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]'):cache +build --ADD_REVISION=$ADD_REVISION
|
|
|
|
|
|
+ run: earthly --platform=linux/amd64 --remote-cache=ghcr.io/$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]'):cache-build-${{github.ref_name}}-amd64 +build --ADD_REVISION=$ADD_REVISION
|
|
env:
|
|
env:
|
|
- EARTHLY_PUSH: "${{ github.ref == 'refs/heads/develop' }}"
|
|
|
|
-
|
|
|
|
- # https://stackoverflow.com/questions/58033366/how-to-get-current-branch-within-github-actions
|
|
|
|
- - name: Extract branch name
|
|
|
|
- id: extract_branch
|
|
|
|
- shell: bash
|
|
|
|
- run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
|
|
|
|
|
|
+ EARTHLY_PUSH: "${{ github.event_name == 'push' }}"
|
|
|
|
|
|
- name: Build xmldoc
|
|
- name: Build xmldoc
|
|
- run: earthly --remote-cache=ghcr.io/$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]'):cache-amd64 +xmldoc --COMMIT=$GITHUB_SHA --BRANCH=${{ steps.extract_branch.outputs.branch }}
|
|
|
|
- env:
|
|
|
|
- EARTHLY_PUSH: "${{ github.ref == 'refs/heads/develop' }}"
|
|
|
|
|
|
+ run: earthly +xmldoc --COMMIT="${{ github.sha }}" --BRANCH="${{ github.ref_name }}"
|
|
|
|
|
|
- name: Upload xmldoc artifact
|
|
- name: Upload xmldoc artifact
|
|
uses: actions/[email protected]
|
|
uses: actions/[email protected]
|
|
@@ -282,8 +272,6 @@ jobs:
|
|
|
|
|
|
linux-arm64-build:
|
|
linux-arm64-build:
|
|
runs-on: ubuntu-18.04
|
|
runs-on: ubuntu-18.04
|
|
- env:
|
|
|
|
- OPAMYES: 1
|
|
|
|
steps:
|
|
steps:
|
|
- name: Login to GitHub Container Registry
|
|
- name: Login to GitHub Container Registry
|
|
uses: docker/login-action@v1
|
|
uses: docker/login-action@v1
|
|
@@ -293,7 +281,7 @@ jobs:
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
|
|
- name: Install Earthly
|
|
- name: Install Earthly
|
|
- run: sudo /bin/sh -c 'wget https://github.com/earthly/earthly/releases/latest/download/earthly-linux-amd64 -O /usr/local/bin/earthly && chmod +x /usr/local/bin/earthly && /usr/local/bin/earthly bootstrap --with-autocomplete'
|
|
|
|
|
|
+ run: sudo /bin/sh -c 'wget https://github.com/earthly/earthly/releases/download/v0.6.2/earthly-linux-amd64 -O /usr/local/bin/earthly && chmod +x /usr/local/bin/earthly && /usr/local/bin/earthly bootstrap --with-autocomplete'
|
|
|
|
|
|
- name: Set up QEMU
|
|
- name: Set up QEMU
|
|
id: qemu
|
|
id: qemu
|
|
@@ -311,9 +299,9 @@ jobs:
|
|
run: echo "ADD_REVISION=1" >> $GITHUB_ENV
|
|
run: echo "ADD_REVISION=1" >> $GITHUB_ENV
|
|
|
|
|
|
- name: Build
|
|
- name: Build
|
|
- run: earthly --platform=linux/arm64 --remote-cache=ghcr.io/$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]'):cache-arm64 +build --ADD_REVISION=$ADD_REVISION
|
|
|
|
|
|
+ run: earthly --platform=linux/arm64 --remote-cache=ghcr.io/$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]'):cache-build-${{github.ref_name}}-arm64 +build --ADD_REVISION=$ADD_REVISION
|
|
env:
|
|
env:
|
|
- EARTHLY_PUSH: "${{ github.ref == 'refs/heads/develop' }}"
|
|
|
|
|
|
+ EARTHLY_PUSH: "${{ github.event_name == 'push' }}"
|
|
|
|
|
|
- name: Upload artifact
|
|
- name: Upload artifact
|
|
uses: actions/[email protected]
|
|
uses: actions/[email protected]
|
|
@@ -627,11 +615,9 @@ jobs:
|
|
working-directory: ${{github.workspace}}/tests
|
|
working-directory: ${{github.workspace}}/tests
|
|
|
|
|
|
|
|
|
|
- linux-test:
|
|
|
|
- needs: linux-build
|
|
|
|
|
|
+ linux-amd64-test:
|
|
|
|
+ needs: linux-amd64-build
|
|
runs-on: ubuntu-18.04
|
|
runs-on: ubuntu-18.04
|
|
- env:
|
|
|
|
- HXCPP_COMPILE_CACHE: ~/hxcache
|
|
|
|
steps:
|
|
steps:
|
|
- name: Login to GitHub Container Registry
|
|
- name: Login to GitHub Container Registry
|
|
uses: docker/login-action@v1
|
|
uses: docker/login-action@v1
|
|
@@ -652,20 +638,12 @@ jobs:
|
|
platforms: all
|
|
platforms: all
|
|
|
|
|
|
- name: Install Earthly
|
|
- name: Install Earthly
|
|
- run: sudo /bin/sh -c 'wget https://github.com/earthly/earthly/releases/latest/download/earthly-linux-amd64 -O /usr/local/bin/earthly && chmod +x /usr/local/bin/earthly && /usr/local/bin/earthly bootstrap --with-autocomplete'\
|
|
|
|
|
|
+ run: sudo /bin/sh -c 'wget https://github.com/earthly/earthly/releases/download/v0.6.2/earthly-linux-amd64 -O /usr/local/bin/earthly && chmod +x /usr/local/bin/earthly && /usr/local/bin/earthly bootstrap --with-autocomplete'\
|
|
|
|
|
|
- name: Test
|
|
- name: Test
|
|
- if: success() && !(matrix.SAUCE && matrix.SAUCE_ACCESS_KEY)
|
|
|
|
- run: earthly --platform=linux/amd64 --remote-cache=ghcr.io/$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]'):cache +test-all
|
|
|
|
- env:
|
|
|
|
- EARTHLY_PUSH: "${{ github.ref == 'refs/heads/develop' }}"
|
|
|
|
-
|
|
|
|
- - name: Test (with SauceLabs)
|
|
|
|
- if: success() && matrix.SAUCE && matrix.SAUCE_ACCESS_KEY
|
|
|
|
- run: earthly --platform=linux/amd64 --remote-cache=ghcr.io/$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]'):cache +test --TEST=js
|
|
|
|
|
|
+ run: earthly --platform=linux/amd64 --remote-cache=ghcr.io/$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]'):cache-test-${{github.ref_name}}-amd64 +test-all
|
|
env:
|
|
env:
|
|
- EARTHLY_PUSH: "${{ github.ref == 'refs/heads/develop' }}"
|
|
|
|
- SAUCE_ACCESS_KEY: matrix.SAUCE_ACCESS_KEY
|
|
|
|
|
|
+ EARTHLY_PUSH: "${{ github.event_name == 'push' }}"
|
|
|
|
|
|
mac-test:
|
|
mac-test:
|
|
needs: mac-build
|
|
needs: mac-build
|
|
@@ -752,8 +730,8 @@ jobs:
|
|
|
|
|
|
|
|
|
|
deploy:
|
|
deploy:
|
|
- if: github.event_name != 'pull_request'
|
|
|
|
- needs: [linux-test, linux-arm64-build, mac-test, windows-test, windows64-test]
|
|
|
|
|
|
+ if: success() && github.repository_owner == 'HaxeFoundation' && github.event_name != 'pull_request'
|
|
|
|
+ needs: [linux-amd64-test, linux-arm64-build, mac-test, windows-test, windows64-test]
|
|
runs-on: ubuntu-18.04
|
|
runs-on: ubuntu-18.04
|
|
steps:
|
|
steps:
|
|
# this is only needed for to get `COMMIT_DATE`...
|
|
# this is only needed for to get `COMMIT_DATE`...
|
|
@@ -828,8 +806,8 @@ jobs:
|
|
aws s3 cp ${HXBUILDS_S3ADDR}/haxe/windows-choco/${FILE_NAME} ${HXBUILDS_S3ADDR}/haxe/windows-choco/haxe_latest.nupkg --acl public-read --website-redirect "${HXBUILDS_S3PATH}/haxe/windows-choco/${FILE_NAME}"
|
|
aws s3 cp ${HXBUILDS_S3ADDR}/haxe/windows-choco/${FILE_NAME} ${HXBUILDS_S3ADDR}/haxe/windows-choco/haxe_latest.nupkg --acl public-read --website-redirect "${HXBUILDS_S3PATH}/haxe/windows-choco/${FILE_NAME}"
|
|
|
|
|
|
deploy_apidoc:
|
|
deploy_apidoc:
|
|
- if: github.event_name != 'pull_request' # TODO: also only when `GHP_REMOTE` is present
|
|
|
|
- needs: [linux-test, mac-test, windows-test, windows64-test]
|
|
|
|
|
|
+ if: success() && github.repository_owner == 'HaxeFoundation' && github.event_name != 'pull_request'
|
|
|
|
+ needs: [linux-amd64-test, linux-arm64-build, mac-test, windows-test, windows64-test]
|
|
runs-on: ubuntu-18.04
|
|
runs-on: ubuntu-18.04
|
|
steps:
|
|
steps:
|
|
- name: Download Haxe
|
|
- name: Download Haxe
|