Skip to content

Commit

Permalink
Builder - package build automation
Browse files Browse the repository at this point in the history
GitHub workflow for package build automation.
Target on macOS 12 (Monterey).

Address somehow issue #123.
  • Loading branch information
ruda committed Oct 11, 2022
1 parent de43838 commit 0a8f938
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 9 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/builder.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: builder
on:
workflow_dispatch:
inputs:
portName:
description: 'Name of the port'
required: true
default: 'hello'
useSDK:
description: 'Use SDK'
type: boolean
default: false
macOS:
description: 'macOS Version'
type: choice
default: 'macos-12'
options:
- macos-12
- macos-11
jobs:
run:
name: ${{ github.event.inputs.portName }}
runs-on: ${{ github.event.inputs.macOS }}
steps:
- uses: actions/checkout@v3
- name: Install SDK
if: ${{ github.event.inputs.useSDK == 'true' }}
run: |
curl -LRO https://github.com/rudix-mac/rudix/releases/download/v2022/autoconf-2.71-macos12.6.pkg
curl -LRO https://github.com/rudix-mac/rudix/releases/download/v2022/automake-1.16.5-macos12.6.pkg
curl -LRO https://github.com/rudix-mac/rudix/releases/download/v2022/pkg-config-0.29.2-macos12.6.pkg
curl -LRO https://github.com/rudix-mac/rudix/releases/download/v2022/lunzip-1.13-macos12.6.pkg
sudo Utils/darwin_installer.py *.pkg
- name: Build package
run: |
cd Ports/${{ github.event.inputs.portName }}
make pkg
- name: Test package
run: |
cd Ports/${{ github.event.inputs.portName }}
make test
- uses: actions/upload-artifact@v3
with:
name: ${{ github.event.inputs.portName }}
path: Ports/${{ github.event.inputs.portName }}/*macos*.pkg
- uses: actions/download-artifact@v3
with:
name: ${{ github.event.inputs.portName }}
5 changes: 2 additions & 3 deletions Utils/darwin_remover.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
#!/usr/bin/python
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Remove packages.
#
# Copyright © 2011-2017 Rudá Moura (Rudix)
# Author: Rudá Moura <[email protected]>
# Copyright © 2011-2022 Rudá Moura <[email protected]>

"""Remove one or more packages."""

Expand Down
5 changes: 2 additions & 3 deletions Utils/darwin_synthesize_distribution.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
#!/usr/bin/python
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright © 2013-2017 Rudá Moura (Rudix)
# Author: Rudá Moura <[email protected]>
# Copyright © 2013-2022 Rudá Moura <[email protected]>
#
# Synthesize a Distribution file.
#
Expand Down
5 changes: 2 additions & 3 deletions Utils/times.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Take times created from each build stage and display like a table (CSV),
Expand All @@ -7,8 +7,7 @@
# Usage: go to any port, type 'make check' and then
# run ../../Library/times.py
#
# Copyright © 2018 Rudix
# Author: Rudá Moura <[email protected]>
# Copyright © 2022 Rudá Moura <[email protected]>
#

import os, sys, time
Expand Down

0 comments on commit 0a8f938

Please sign in to comment.