Skip to content

Deploy

Deploy #4

Workflow file for this run

name: Deploy
on:
release:
types:
- created
jobs:
########################################################################################
checkout:
name: Checkout
strategy:
matrix:
machine: [x64_linux, x64_mac, arm64_linux, arm64_mac]
runs-on: [self-hosted, famsa, '${{ matrix.machine }}']
steps:
- name: clean
run: rm -rf ${{ github.workspace }}/*
- uses: actions/checkout@v4
with:
submodules: recursive
########################################################################################
checkout-windows:
name: checkout (Windows)
strategy:
matrix:
machine: [x64_windows]
runs-on: [self-hosted, famsa, '${{ matrix.machine }}']
steps:
- name: clean
run: Remove-Item -Path "${{ github.workspace }}/*" -Recurse -Force
- uses: actions/checkout@v4
with:
submodules: recursive
########################################################################################
make:
name: Make
needs: checkout
strategy:
fail-fast: false
matrix:
machine: [x64_linux]
platform: [avx2]
compiler: [13]
include:
- {machine: arm64_linux, platform: arm8, compiler: 12}
- {machine: x64_mac, platform: avx2, compiler: 13}
- {machine: arm64_mac, platform: m1, compiler: 13}
runs-on: [self-hosted, famsa, '${{ matrix.machine }}']
steps:
- name: make
run: gmake -j32 CXX=g++-${{matrix.compiler}} CC=gcc-${{matrix.compiler}} STATIC_LINK=true PLATFORM=${{ matrix.platform }}
- name: tar artifacts
run: tar -cvzf famsa.tar.gz LICENSE -C ./bin famsa
########################################################################################
make-windows:
name: Make (Windows)
needs: checkout-windows
strategy:
fail-fast: false
matrix:
machine: [x64_windows]
runs-on: [self-hosted, famsa, '${{ matrix.machine }}']
env:
MSBUILD: "C:/Microsoft Visual Studio/2022/Community/MSBuild/Current/Bin/MSBuild.exe"
steps:
- name: make
run: |
& "$env:MSBUILD" FAMSA.sln /p:Configuration=Release /p:Platform=x64 /m
- name: tar artifacts
run: tar -cvzf famsa.tar.gz LICENSE -C ./x64/Release famsa.exe
########################################################################################
help:
name: Print usage
needs:
- make
- make-windows
strategy:
fail-fast: false
matrix:
machine: [x64_linux, x64_mac, arm64_linux, arm64_mac]
exec: [./bin/famsa]
include:
- {machine: x64_windows, exec: ./x64/Release/famsa.exe}
runs-on: [self-hosted, famsa, '${{ matrix.machine }}']
steps:
- name: help
run: ${{ matrix.exec }}
########################################################################################
upload:
name: Upload
needs: help
strategy:
fail-fast: false
matrix:
machine: [x64_linux, x64_mac, arm64_linux, arm64_mac, x64_windows]
runs-on: [self-hosted, famsa, '${{ matrix.machine }}']
steps:
- name: deploy
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./famsa.tar.gz
asset_name: famsa-${{ github.event.release.tag_name }}-${{matrix.machine}}.tar.gz
asset_content_type: application/gzip