cia-unix/.github/workflows/cia-unix-build.yml
shijimasoft 39b7b43b33
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
support for linux-arm64 github actions
2025-04-10 15:40:52 +02:00

59 lines
1.9 KiB
YAML

name: cia-unix build
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
release:
strategy:
matrix:
include:
# Linux x86-64
- os: ubuntu-latest
artifact_name: ${{ github.event.repository.name }}
asset_name: ${{ github.event.repository.name }}-linux-x86_64
# Linux arm64
- os: ubuntu-22.04-arm
artifact_name: ${{ github.event.repository.name }}
asset_name: ${{ github.event.repository.name }}-linux-arm64
# macOS x86-64
- os: macos-13
artifact_name: ${{ github.event.repository.name }}
asset_name: ${{ github.event.repository.name }}-macos-x86_64
# macOS arm64
- os: macos-latest
artifact_name: ${{ github.event.repository.name }}
asset_name: ${{ github.event.repository.name }}-macos-arm64
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install Crystal for linux-arm64
if: matrix.os == 'ubuntu-22.04-arm'
run: |
curl -fsSL https://packagecloud.io/84codes/crystal/gpgkey | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/84codes_crystal.gpg > /dev/null
. /etc/os-release
echo "deb https://packagecloud.io/84codes/crystal/$ID $VERSION_CODENAME main" | sudo tee /etc/apt/sources.list.d/84codes_crystal.list
sudo apt-get update
sudo apt-get install crystal
- 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 }}