mirror of
https://github.com/timsutton/brigadier.git
synced 2025-06-06 01:31:19 -04:00
GitHub Actions (#62)
This commit is contained in:
parent
90c7eb00f6
commit
35b074b451
4 changed files with 63 additions and 0 deletions
34
.github/workflows/main.yml
vendored
Normal file
34
.github/workflows/main.yml
vendored
Normal file
|
@ -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
ci/windows/ci-windows.sh
Executable file
21
ci/windows/ci-windows.sh
Executable file
|
@ -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
ci/windows/requirements.txt
Normal file
1
ci/windows/requirements.txt
Normal file
|
@ -0,0 +1 @@
|
|||
pyinstaller==3.6
|
7
ci/windows/test.sh
Normal file
7
ci/windows/test.sh
Normal file
|
@ -0,0 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -eux -o pipefail
|
||||
|
||||
whoami
|
||||
|
||||
/d/a/brigadier/brigadier/dist/brigadier -m Macmini4,1 -i
|
Loading…
Add table
Add a link
Reference in a new issue