-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathstandalone.github-workflow.yml
More file actions
68 lines (58 loc) · 1.95 KB
/
Copy pathstandalone.github-workflow.yml
File metadata and controls
68 lines (58 loc) · 1.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: standalone-binary
# READY-TO-USE WORKFLOW TEMPLATE.
# Copy this file to `.github/workflows/standalone.yml` to activate it. It lives
# under `packaging/` in the repo because the automation token that maintains this
# branch is not permitted to create files under `.github/workflows/`.
#
# Build the zero-Python `stata-code` binary for each OS. Runs on version tags
# and on demand. Artifacts are uploaded per-OS; paired with `--backend console`
# they give a Python-free path to typed Stata results on the target machine.
on:
push:
tags: ["v*"]
workflow_dispatch:
permissions:
contents: read
jobs:
build:
name: build (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
asset: stata-code-linux-x64
- os: macos-latest
asset: stata-code-macos-arm64
- os: windows-latest
asset: stata-code-windows-x64
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v6
with:
python-version: "3.12"
cache: pip
- name: Install package + PyInstaller
run: |
python -m pip install --upgrade pip
pip install -e .
pip install pyinstaller
- name: Build standalone binary
run: python scripts/build_standalone.py --name ${{ matrix.asset }}
- name: Smoke test (non-Windows)
if: runner.os != 'Windows'
run: |
./dist/${{ matrix.asset }} --version
./dist/${{ matrix.asset }} lint -e "regress y x"
- name: Smoke test (Windows)
if: runner.os == 'Windows'
run: |
./dist/${{ matrix.asset }}.exe --version
./dist/${{ matrix.asset }}.exe lint -e "regress y x"
- name: Upload artifact
uses: actions/upload-artifact@v7
with:
name: ${{ matrix.asset }}
path: dist/${{ matrix.asset }}*
if-no-files-found: error