|
@@ -199,8 +199,9 @@ jobs:
|
|
|
|
|
|
linux-amd64:
|
|
|
runs-on: ubuntu-18.04
|
|
|
+ permissions:
|
|
|
+ packages: write
|
|
|
env:
|
|
|
- EARTHLY_PLATFORMS: linux/amd64
|
|
|
FORCE_COLOR: 1
|
|
|
steps:
|
|
|
- name: Login to GitHub Container Registry
|
|
@@ -211,7 +212,7 @@ jobs:
|
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
|
|
- name: Install Earthly
|
|
|
- run: sudo /bin/sh -c 'wget https://github.com/earthly/earthly/releases/download/v0.6.5/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.13/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
|
|
|
with:
|
|
@@ -221,10 +222,21 @@ jobs:
|
|
|
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
|
|
run: echo "ADD_REVISION=1" >> $GITHUB_ENV
|
|
|
|
|
|
+ - name: Set CONTAINER_REG
|
|
|
+ run: echo "CONTAINER_REG=$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
|
|
|
+
|
|
|
+ - name: Build devcontainer
|
|
|
+ run: earthly +devcontainer --ADD_REVISION="$ADD_REVISION" --IMAGE_NAME="ghcr.io/${CONTAINER_REG}_devcontainer" --IMAGE_TAG="${{github.ref_name}}-amd64" --IMAGE_CACHE="ghcr.io/haxefoundation/haxe_devcontainer:development-amd64"
|
|
|
+ env:
|
|
|
+ EARTHLY_PUSH: "${{ github.event_name == 'push' }}"
|
|
|
+ EARTHLY_USE_INLINE_CACHE: true
|
|
|
+ EARTHLY_SAVE_INLINE_CACHE: true
|
|
|
+
|
|
|
- name: Build
|
|
|
- run: earthly --remote-cache=ghcr.io/$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]')_cache:build-${{github.ref_name}}-amd64 +build --ADD_REVISION=$ADD_REVISION
|
|
|
+ run: earthly +build --ADD_REVISION="$ADD_REVISION"
|
|
|
env:
|
|
|
EARTHLY_PUSH: "${{ github.event_name == 'push' }}"
|
|
|
+ EARTHLY_REMOTE_CACHE: "ghcr.io/${{env.CONTAINER_REG}}_cache:build-${{github.ref_name}}-amd64"
|
|
|
|
|
|
- name: Build xmldoc
|
|
|
run: earthly +xmldoc --COMMIT="${{ github.sha }}" --BRANCH="${{ github.ref_name }}"
|
|
@@ -242,14 +254,16 @@ jobs:
|
|
|
path: out/linux/amd64
|
|
|
|
|
|
- name: Test
|
|
|
- run: earthly --remote-cache=ghcr.io/$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]')_cache:test-${{github.ref_name}}-amd64 +test-all --GITHUB_ACTIONS="$GITHUB_ACTIONS"
|
|
|
+ run: earthly +test-all --GITHUB_ACTIONS="$GITHUB_ACTIONS"
|
|
|
env:
|
|
|
EARTHLY_PUSH: "${{ github.event_name == 'push' }}"
|
|
|
+ EARTHLY_REMOTE_CACHE: "ghcr.io/${{env.CONTAINER_REG}}_cache:test-${{github.ref_name}}-amd64"
|
|
|
|
|
|
linux-arm64:
|
|
|
runs-on: ubuntu-18.04
|
|
|
+ permissions:
|
|
|
+ packages: write
|
|
|
env:
|
|
|
- EARTHLY_PLATFORMS: linux/arm64
|
|
|
FORCE_COLOR: 1
|
|
|
steps:
|
|
|
- name: Login to GitHub Container Registry
|
|
@@ -260,7 +274,7 @@ jobs:
|
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
|
|
- name: Install Earthly
|
|
|
- run: sudo /bin/sh -c 'wget https://github.com/earthly/earthly/releases/download/v0.6.5/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.13/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
|
|
|
id: qemu
|
|
@@ -277,10 +291,21 @@ jobs:
|
|
|
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
|
|
run: echo "ADD_REVISION=1" >> $GITHUB_ENV
|
|
|
|
|
|
+ - name: Set CONTAINER_REG
|
|
|
+ run: echo "CONTAINER_REG=$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
|
|
|
+
|
|
|
+ - name: Build devcontainer
|
|
|
+ run: earthly --platform=linux/arm64 +devcontainer --ADD_REVISION="$ADD_REVISION" --IMAGE_NAME="ghcr.io/${CONTAINER_REG}_devcontainer" --IMAGE_TAG="${{github.ref_name}}-arm64" --IMAGE_CACHE="ghcr.io/haxefoundation/haxe_devcontainer:development-arm64"
|
|
|
+ env:
|
|
|
+ EARTHLY_PUSH: "${{ github.event_name == 'push' }}"
|
|
|
+ EARTHLY_USE_INLINE_CACHE: true
|
|
|
+ EARTHLY_SAVE_INLINE_CACHE: true
|
|
|
+
|
|
|
- name: Build
|
|
|
- run: earthly --remote-cache=ghcr.io/$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]')_cache:build-${{github.ref_name}}-arm64 +build --ADD_REVISION=$ADD_REVISION
|
|
|
+ run: earthly --platform=linux/arm64 +build --ADD_REVISION="$ADD_REVISION"
|
|
|
env:
|
|
|
EARTHLY_PUSH: "${{ github.event_name == 'push' }}"
|
|
|
+ EARTHLY_REMOTE_CACHE: "ghcr.io/${{env.CONTAINER_REG}}_cache:build-${{github.ref_name}}-arm64"
|
|
|
|
|
|
- name: Upload artifact
|
|
|
uses: actions/[email protected]
|