Skip to content

Commit

Permalink
GitHub Actions (#62)
Browse files Browse the repository at this point in the history
  • Loading branch information
timsutton authored Nov 9, 2022
1 parent 90c7eb0 commit 35b074b
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# This is a basic workflow to help you get started with Actions

name: CI

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the master branch
# push:
# branches: [ master ]
pull_request:
branches: [ master ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
build:
runs-on: windows-2019
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Build
run: bash .\ci\windows\ci-windows.sh

- name: Archive
uses: actions/upload-artifact@v3
with:
name: brigadier-windows-exe
path: D:\a\brigadier\brigadier\dist

# Running the command as a test isn't really useful to us yet
# - name: Test
# run: bash .\ci\windows\test.sh
21 changes: 21 additions & 0 deletions ci/windows/ci-windows.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash

set -eux -o pipefail

PYTHON_VERSION=2.7.18

script_dir="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &> /dev/null && pwd )"
python="/c/hostedtoolcache/windows/Python/${PYTHON_VERSION}/x64/python"

export PYTHONPATH="${python}"
$python -V
$python -m pip install -r "${script_dir}/requirements.txt"
$python -m pip freeze

# pip-installed exes will be installed here, so we'll put those at the front
# of the PATH
PATH="/c/hostedtoolcache/windows/Python/${PYTHON_VERSION}/x64/Scripts:$PATH"

pyinstaller \
--onefile \
brigadier
1 change: 1 addition & 0 deletions ci/windows/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pyinstaller==3.6
7 changes: 7 additions & 0 deletions ci/windows/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

set -eux -o pipefail

whoami

/d/a/brigadier/brigadier/dist/brigadier -m Macmini4,1 -i

0 comments on commit 35b074b

Please sign in to comment.