Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(build, ci): Bring Python in CI #424

Merged
merged 2 commits into from
Jan 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 27 additions & 14 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,22 @@ on:
env:
GO_VERSION: 1.23.x
WIX_VERSION: 5.0.0
PYTHON_VERSION: 3.7.9

jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- name: Checkout
uses: actions/checkout@v4
go-version: ${{ env.GO_VERSION }}
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Adjust pkg-config prefix
shell: bash
run: |
Expand Down Expand Up @@ -101,12 +106,12 @@ jobs:
build-slim:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- name: Checkout
uses: actions/checkout@v4
go-version: ${{ env.GO_VERSION }}
- name: Build
shell: bash
run: |
Expand All @@ -126,14 +131,18 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Adjust pkg-config prefix
shell: bash
run: |
sed -i 's/C:\/Python37/C:\/hostedtoolcache\/windows\/Python\/3.7.9\/x64/' pkg-config/python-37.pc
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- name: Setup msys2
uses: msys2/setup-msys2@v2
with:
Expand Down Expand Up @@ -176,14 +185,18 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Adjust pkg-config prefix
shell: bash
run: |
sed -i 's/C:\/Python37/C:\/hostedtoolcache\/windows\/Python\/3.7.9\/x64/' pkg-config/python-37.pc
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- name: Setup msys2
uses: msys2/setup-msys2@v2
with:
Expand Down
35 changes: 24 additions & 11 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
env:
GO_VERSION: 1.23.x
WIX_VERSION: 5.0.0
PYTHON_VERSION: 3.7.9

jobs:
build:
Expand All @@ -19,12 +20,16 @@ jobs:
uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- name: Checkout
uses: actions/checkout@v4
go-version: ${{ env.GO_VERSION }}
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Adjust pkg-config prefix
shell: bash
run: |
Expand Down Expand Up @@ -108,14 +113,18 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Adjust pkg-config prefix
shell: bash
run: |
sed -i 's/C:\/Python37/C:\/hostedtoolcache\/windows\/Python\/3.7.9\/x64/' pkg-config/python-37.pc
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- name: Setup msys2
uses: msys2/setup-msys2@v2
with:
Expand Down Expand Up @@ -158,14 +167,18 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Adjust pkg-config prefix
shell: bash
run: |
sed -i 's/C:\/Python37/C:\/hostedtoolcache\/windows\/Python\/3.7.9\/x64/' pkg-config/python-37.pc
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- name: Setup msys2
uses: msys2/setup-msys2@v2
with:
Expand Down
17 changes: 11 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,22 @@ on:
env:
GO_VERSION: 1.23.x
WIX_VERSION: 5.0.0
PYTHON_VERSION: 3.7.9

jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- name: Checkout
uses: actions/checkout@v4
go-version: ${{ env.GO_VERSION }}
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Adjust pkg-config prefix
shell: bash
run: |
Expand Down Expand Up @@ -115,12 +120,12 @@ jobs:
build-slim:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- name: Checkout
uses: actions/checkout@v4
go-version: ${{ env.GO_VERSION }}
- name: Get version
id: get_version
shell: bash
Expand Down
2 changes: 2 additions & 0 deletions make.bat
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ if "%~1"=="mc" goto mc
:build
:: set PKG_CONFIG_PATH=pkg-config
go build -ldflags %LDFLAGS% -tags %TAGS% -o .\cmd\fibratus\fibratus.exe .\cmd\fibratus
if errorlevel 1 goto fail
go build -ldflags %LDFLAGS% -o .\cmd\systray\fibratus-systray.exe .\cmd\systray
if errorlevel 1 goto fail
goto :EOF
Expand All @@ -79,6 +80,7 @@ goto :EOF
:rsrc
set RC_VER=%VERSION:.=,%
windres --define RC_VER=%RC_VER% --define VER=%VERSION% -i cmd\fibratus\fibratus.rc -O coff -o cmd\fibratus\fibratus.syso
if errorlevel 1 goto fail
windres --define RC_VER=%RC_VER% --define VER=%VERSION% -i cmd\systray\fibratus-systray.rc -O coff -o cmd\systray\fibratus-systray.syso
if errorlevel 1 goto fail
goto :EOF
Expand Down
Loading