Add M1 and aarch to bindist tests
This commit is contained in:
parent
cd5ff36ece
commit
8544b1bd49
204
.github/workflows/bindists.yaml
vendored
204
.github/workflows/bindists.yaml
vendored
@ -84,186 +84,62 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
${{ matrix.installCmd }} curl bash git ${{ matrix.toolRequirements }}
|
${{ matrix.installCmd }} curl bash git ${{ matrix.toolRequirements }}
|
||||||
|
|
||||||
- if: ${{ github.event_name != 'workflow_dispatch' }}
|
- uses: actions/checkout@v3
|
||||||
uses: shpingalet007/pull-request-comment-trigger@696de492b50cee0ba671934893c91c5805a403b9
|
|
||||||
id: check
|
|
||||||
with:
|
|
||||||
trigger: '@bindistTest ** ** **'
|
|
||||||
reaction: rocket
|
|
||||||
allow_arguments: true
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: '${{secrets.GITHUB_TOKEN}}'
|
|
||||||
|
|
||||||
- if: ${{ github.event_name != 'workflow_dispatch' }}
|
- name: Install ghcup and bindist
|
||||||
uses: shpingalet007/pull-request-comment-trigger@696de492b50cee0ba671934893c91c5805a403b9
|
run: .github/workflows/install-bindist.sh
|
||||||
id: checkRef
|
|
||||||
with:
|
|
||||||
trigger: '@bindistTestRef ** ** ** **'
|
|
||||||
reaction: rocket
|
|
||||||
allow_arguments: true
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: '${{secrets.GITHUB_TOKEN}}'
|
|
||||||
|
|
||||||
- if: ${{ steps.checkRef.outputs.triggered == 'true' }}
|
bindist-install-mac-win:
|
||||||
uses: actions/checkout@v3
|
name: Build non-linux
|
||||||
with:
|
|
||||||
ref: ${{ fromJson(steps.checkRef.outputs.arguments)[3] }}
|
|
||||||
|
|
||||||
- if: ${{ steps.checkRef.outputs.triggered != 'true' }}
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- if: ${{ github.event_name != 'workflow_dispatch' && steps.check.outputs.triggered == 'true' }}
|
|
||||||
continue-on-error: true
|
|
||||||
name: Install ghcup and bindist
|
|
||||||
run: |
|
|
||||||
export TOOL=${{ fromJson(steps.check.outputs.arguments)[0] }}
|
|
||||||
export VERSION=${{ fromJson(steps.check.outputs.arguments)[1] }}
|
|
||||||
export METADATA_FILE=${{ fromJson(steps.check.outputs.arguments)[2] }}
|
|
||||||
.github/workflows/install-bindist.sh
|
|
||||||
echo SUCCESS=true >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- if: ${{ github.event_name != 'workflow_dispatch' && steps.check.outputs.triggered != 'true' && steps.checkRef.outputs.triggered == 'true' }}
|
|
||||||
continue-on-error: true
|
|
||||||
name: Install ghcup and bindist
|
|
||||||
run: |
|
|
||||||
export TOOL=${{ fromJson(steps.checkRef.outputs.arguments)[0] }}
|
|
||||||
export VERSION=${{ fromJson(steps.checkRef.outputs.arguments)[1] }}
|
|
||||||
export METADATA_FILE=${{ fromJson(steps.checkRef.outputs.arguments)[2] }}
|
|
||||||
.github/workflows/install-bindist.sh
|
|
||||||
echo SUCCESS=true >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- if: ${{ github.event_name == 'workflow_dispatch' }}
|
|
||||||
name: Install ghcup and bindist
|
|
||||||
run: |
|
|
||||||
.github/workflows/install-bindist.sh
|
|
||||||
echo SUCCESS=true >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- run: |
|
|
||||||
if [ "${{ env.SUCCESS }}" = "true" ] ; then
|
|
||||||
echo "true" > message-linux.txt
|
|
||||||
else
|
|
||||||
echo "false" > message-linux.txt
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Upload artifact
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: artifacts
|
|
||||||
path: |
|
|
||||||
./message-linux.txt
|
|
||||||
|
|
||||||
bindist-install-non-linux:
|
|
||||||
name: ${{ matrix.os }}
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os:
|
include:
|
||||||
- macos-11
|
- os: [self-hosted, macOS, ARM64]
|
||||||
- macos-12
|
- os: macos-11
|
||||||
- windows-latest
|
- os: macos-12
|
||||||
|
- os: windows-latest
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- if: ${{ github.event_name != 'workflow_dispatch' }}
|
|
||||||
uses: shpingalet007/pull-request-comment-trigger@696de492b50cee0ba671934893c91c5805a403b9
|
|
||||||
id: check
|
|
||||||
with:
|
|
||||||
trigger: '@bindistTest ** ** **'
|
|
||||||
reaction: rocket
|
|
||||||
allow_arguments: true
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: '${{secrets.GITHUB_TOKEN}}'
|
|
||||||
|
|
||||||
- if: ${{ github.event_name != 'workflow_dispatch' }}
|
- uses: actions/checkout@v3
|
||||||
uses: shpingalet007/pull-request-comment-trigger@696de492b50cee0ba671934893c91c5805a403b9
|
|
||||||
id: checkRef
|
|
||||||
with:
|
|
||||||
trigger: '@bindistTestRef ** ** ** **'
|
|
||||||
reaction: rocket
|
|
||||||
allow_arguments: true
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: '${{secrets.GITHUB_TOKEN}}'
|
|
||||||
|
|
||||||
- if: ${{ steps.checkRef.outputs.triggered == 'true' }}
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
ref: ${{ fromJson(steps.checkRef.outputs.arguments)[3] }}
|
|
||||||
|
|
||||||
- if: ${{ steps.checkRef.outputs.triggered != 'true' }}
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- if: ${{ github.event_name != 'workflow_dispatch' && steps.check.outputs.triggered == 'true' }}
|
|
||||||
continue-on-error: true
|
|
||||||
name: Install ghcup and bindist
|
|
||||||
run: |
|
|
||||||
export TOOL=${{ fromJson(steps.check.outputs.arguments)[0] }}
|
|
||||||
export VERSION=${{ fromJson(steps.check.outputs.arguments)[1] }}
|
|
||||||
export METADATA_FILE=${{ fromJson(steps.check.outputs.arguments)[2] }}
|
|
||||||
.github/workflows/install-bindist.sh
|
|
||||||
echo SUCCESS=true >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- if: ${{ github.event_name != 'workflow_dispatch' && steps.check.outputs.triggered != 'true' && steps.checkRef.outputs.triggered == 'true' }}
|
|
||||||
continue-on-error: true
|
|
||||||
name: Install ghcup and bindist
|
|
||||||
run: |
|
|
||||||
export TOOL=${{ fromJson(steps.checkRef.outputs.arguments)[0] }}
|
|
||||||
export VERSION=${{ fromJson(steps.checkRef.outputs.arguments)[1] }}
|
|
||||||
export METADATA_FILE=${{ fromJson(steps.checkRef.outputs.arguments)[2] }}
|
|
||||||
.github/workflows/install-bindist.sh
|
|
||||||
echo SUCCESS=true >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- if: ${{ github.event_name == 'workflow_dispatch' }}
|
- if: ${{ github.event_name == 'workflow_dispatch' }}
|
||||||
name: Install ghcup and bindist
|
name: Install ghcup and bindist
|
||||||
run: |
|
run: .github/workflows/install-bindist.sh
|
||||||
.github/workflows/install-bindist.sh
|
|
||||||
echo SUCCESS=true >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- run: |
|
bindist-install-arm:
|
||||||
if [ "${{ env.SUCCESS }}" = "true" ] ; then
|
name: Build ARM binary
|
||||||
echo "true" > message.txt
|
runs-on: ${{ matrix.os }}
|
||||||
else
|
strategy:
|
||||||
echo "false" > message.txt
|
fail-fast: false
|
||||||
fi
|
matrix:
|
||||||
|
include:
|
||||||
- name: Upload artifact
|
- os: [self-hosted, Linux, ARM64, aarch32-linux]
|
||||||
uses: actions/upload-artifact@v3
|
ARCH: ARM
|
||||||
with:
|
- os: [self-hosted, Linux, ARM64]
|
||||||
name: artifacts
|
ARCH: ARM64
|
||||||
path: |
|
|
||||||
./message.txt
|
|
||||||
|
|
||||||
comment:
|
|
||||||
name: comment
|
|
||||||
needs: ["bindist-install", "bindist-install-non-linux"]
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
steps:
|
||||||
- name: Download artifacts
|
- uses: docker://arm64v8/ubuntu:focal
|
||||||
uses: actions/download-artifact@v3
|
name: Cleanup (aarch64 linux)
|
||||||
with:
|
with:
|
||||||
name: artifacts
|
args: "find . -mindepth 1 -maxdepth 1 -exec rm -rf -- {} +"
|
||||||
|
|
||||||
- run: |
|
- name: git config
|
||||||
if [ "$(cat message.txt)" == "true" ] && [ "$(cat message-linux.txt)" == "true" ] ; then
|
|
||||||
echo "SUCCESS=true" >> $GITHUB_ENV
|
|
||||||
else
|
|
||||||
echo "SUCCESS=false" >> $GITHUB_ENV
|
|
||||||
fi
|
|
||||||
|
|
||||||
- id: message
|
|
||||||
run: |
|
run: |
|
||||||
if [ "${{ env.SUCCESS }}" = "true" ] ; then
|
git config --global --get-all safe.directory | grep '^\*$' || git config --global --add safe.directory "*"
|
||||||
echo 'MESSAGE=Bindist check success :+1:' >> $GITHUB_OUTPUT
|
shell: bash
|
||||||
else
|
|
||||||
echo 'MESSAGE=Bindist check failure :-1:' >> $GITHUB_OUTPUT
|
|
||||||
fi
|
|
||||||
|
|
||||||
- if: ${{ github.event_name == 'pull_request' }}
|
- uses: actions/checkout@v3
|
||||||
name: Comment PR
|
|
||||||
uses: thollander/actions-comment-pull-request@v2
|
- if: matrix.ARCH == 'ARM'
|
||||||
|
uses: docker://hasufell/arm32v7-ubuntu-haskell:focal
|
||||||
|
name: Run build (armv7 linux)
|
||||||
with:
|
with:
|
||||||
message: |
|
args: sh -c '.github/workflows/install-bindist.sh'
|
||||||
${{ steps.message.outputs.MESSAGE }}
|
|
||||||
|
|
||||||
- name: Check on failures
|
|
||||||
if: env.SUCCESS != 'true'
|
|
||||||
run: exit 1
|
|
||||||
|
|
||||||
|
- if: matrix.ARCH == 'ARM64'
|
||||||
|
uses: docker://hasufell/arm64v8-ubuntu-haskell:focal
|
||||||
|
name: Run build (aarch64 linux)
|
||||||
|
with:
|
||||||
|
args: sh -c '.github/workflows/install-bindist.sh'
|
||||||
|
2
.github/workflows/install-bindist.sh
vendored
2
.github/workflows/install-bindist.sh
vendored
@ -18,7 +18,7 @@ fi
|
|||||||
|
|
||||||
ghcup -v --url-source=file:$METADATA_FILE install $TOOL --set $VERSION
|
ghcup -v --url-source=file:$METADATA_FILE install $TOOL --set $VERSION
|
||||||
|
|
||||||
mkdir /tmp/install-bindist-ci
|
mkdir -p /tmp/install-bindist-ci
|
||||||
cd /tmp/install-bindist-ci
|
cd /tmp/install-bindist-ci
|
||||||
|
|
||||||
cat <<EOF > main.hs
|
cat <<EOF > main.hs
|
||||||
|
Loading…
Reference in New Issue
Block a user