support for linux-arm64 github actions
Some checks failed
cia-unix build / release (${{ github.event.repository.name }}, ${{ github.event.repository.name }}-linux-arm64, ubuntu-22.04-arm) (push) Has been cancelled
cia-unix build / release (${{ github.event.repository.name }}, ${{ github.event.repository.name }}-linux-x86_64, ubuntu-latest) (push) Has been cancelled
cia-unix build / release (${{ github.event.repository.name }}, ${{ github.event.repository.name }}-macos-arm64, macos-latest) (push) Has been cancelled
cia-unix build / release (${{ github.event.repository.name }}, ${{ github.event.repository.name }}-macos-x86_64, macos-13) (push) Has been cancelled

This commit is contained in:
shijimasoft 2025-04-10 15:40:52 +02:00
parent 41da61280e
commit 39b7b43b33

View File

@ -11,33 +11,48 @@ jobs:
strategy: strategy:
matrix: matrix:
include: include:
# Linux x86-64 # Linux x86-64
- os: ubuntu-latest - os: ubuntu-latest
artifact_name: ${{ github.event.repository.name }} artifact_name: ${{ github.event.repository.name }}
asset_name: ${{ github.event.repository.name }}-linux-x86_64 asset_name: ${{ github.event.repository.name }}-linux-x86_64
# Linux arm64 # Linux arm64
- os: ubuntu-22.04-arm - os: ubuntu-22.04-arm
artifact_name: ${{ github.event.repository.name }} artifact_name: ${{ github.event.repository.name }}
asset_name: ${{ github.event.repository.name }}-linux-arm64 asset_name: ${{ github.event.repository.name }}-linux-arm64
# macOS x86-64 # macOS x86-64
- os: macos-13 - os: macos-13
artifact_name: ${{ github.event.repository.name }} artifact_name: ${{ github.event.repository.name }}
asset_name: ${{ github.event.repository.name }}-macos-x86_64 asset_name: ${{ github.event.repository.name }}-macos-x86_64
# macOS arm64 # macOS arm64
- os: macos-latest - os: macos-latest
artifact_name: ${{ github.event.repository.name }} artifact_name: ${{ github.event.repository.name }}
asset_name: ${{ github.event.repository.name }}-macos-arm64 asset_name: ${{ github.event.repository.name }}-macos-arm64
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Install crystal - uses: actions/checkout@v4
uses: crystal-lang/install-crystal@v1
- uses: actions/checkout@v4 - name: Install Crystal for linux-arm64
- name: Build release if: matrix.os == 'ubuntu-22.04-arm'
run: | run: |
crystal build ${{ matrix.artifact_name }}.cr --release --no-debug curl -fsSL https://packagecloud.io/84codes/crystal/gpgkey | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/84codes_crystal.gpg > /dev/null
strip ${{ matrix.artifact_name }} . /etc/os-release
- name: Upload artifacts echo "deb https://packagecloud.io/84codes/crystal/$ID $VERSION_CODENAME main" | sudo tee /etc/apt/sources.list.d/84codes_crystal.list
uses: actions/upload-artifact@v4.3.3 sudo apt-get update
with: sudo apt-get install crystal
name: ${{ matrix.asset_name }}
path: ${{ matrix.artifact_name}} - name: Install Crystal for linux-x86_64 and macOS
if: matrix.os != 'ubuntu-22.04-arm'
uses: crystal-lang/install-crystal@v1
- name: Build release
run: |
crystal build ${{ matrix.artifact_name }}.cr --release --no-debug
strip ${{ matrix.artifact_name }}
- name: Upload artifacts
uses: actions/upload-artifact@v4.3.3
with:
name: ${{ matrix.asset_name }}
path: ${{ matrix.artifact_name }}