Skip to content

Init on one server ready #209

Init on one server ready

Init on one server ready #209

name: "DEV tvm-python x86_64 Linux"
on:
push:
branches: [ dev ]
pull_request:
branches: [ dev ]
workflow_dispatch:
workflow_call:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build39: # Fast deploy to dev
strategy:
matrix:
python: [310, 312]
runs-on: linux
steps:
- uses: kenchan0130/actions-system-info@master
id: system-info
- name: System info
run: |
OUTPUTS=(
"CPU Core: ${{ steps.system-info.outputs.cpu-core }}"
"CPU Model: ${{ steps.system-info.outputs.cpu-model }}"
"Hostname: ${{ steps.system-info.outputs.hostname }}"
"Kernel release: ${{ steps.system-info.outputs.kernel-release }}"
"Kernel version: ${{ steps.system-info.outputs.kernel-version }}"
"Name: ${{ steps.system-info.outputs.name }}"
"Platform: ${{ steps.system-info.outputs.platform }}"
"Release: ${{ steps.system-info.outputs.release }}"
"Total memory bytes: ${{ steps.system-info.outputs.totalmem }}"
)
IS_EMPTY_OUTOUT=false
for OUTPUT in "${OUTPUTS[@]}";do
echo "${OUTPUT}"
OUT=$(echo ${OUTPUT} | cut -d ':' -f2- | xargs)
if [[ -z "${OUT}" ]];then
IS_EMPTY_OUTOUT=true
fi
done
if "$IS_EMPTY_OUTOUT";then
exit 1
fi
- name: Install deps
run: |
sudo apt update -y
sudo apt install -y git curl xz-utils
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- uses: cachix/install-nix-action@v22
with:
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
env:
USER: runner
- uses: cachix/cachix-action@v12
with:
name: disintar
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
env:
USER: runner
- run: |
export KERNEL=$(nix eval --raw 'nixpkgs#hostPlatform.parsed.kernel.name')
echo "TARGET_SYSTEM=x86_64-$KERNEL" >> $GITHUB_ENV
echo "RELEASE_NAME=ton-cpython-${{ matrix.python }}-x86_64-$KERNEL" >> $GITHUB_ENV
- name: Compile
run: nix build .?submodules=1#packages.x86_64-linux.ton-python-${{ matrix.python }}
--print-build-logs --system x86_64-linux -o result-x86_64
- name: Copy binaries
run: |
ls -lart
mkdir artifacts
cp $PWD/result-x86_64/lib/* artifacts/
- name: Simple binaries test
run: nix develop .#packages.x86_64-linux.ton-python-${{ matrix.python }}
-c bash -c "cd artifacts; python3 -c 'import python_ton'"
- name: Upload artifacts
uses: actions/upload-artifact@master
with:
name: ${{ env.RELEASE_NAME }}
path: artifacts
- name: Upload artifacts
uses: workflow/[email protected]
with:
flakes: nixpkgs#gh
script: |
gh release delete -y "$RELEASE_NAME" || true
gh release create --notes "" "$RELEASE_NAME" artifacts/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}