Skip to content
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
65 changes: 63 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ permissions:
contents: read
pages: write
id-token: write
packages: write

concurrency:
group: main
Expand All @@ -35,6 +36,11 @@ jobs:

build-linux:
runs-on: ubuntu-latest
env:
USERNAME: asfernandes
VCPKG_EXE: ${{ github.workspace }}/vcpkg/vcpkg
FEED_URL: https://nuget.pkg.github.com/asfernandes/index.json
VCPKG_BINARY_SOURCES: "clear;nuget,https://nuget.pkg.github.com/asfernandes/index.json,readwrite"
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand Down Expand Up @@ -67,7 +73,8 @@ jobs:
graphviz \
ninja-build \
libtommath1 \
libtomcrypt1
libtomcrypt1 \
mono-complete

- name: Install Firebird
run: |
Expand All @@ -87,6 +94,20 @@ jobs:
run: |
./vcpkg/bootstrap-vcpkg.sh -disableMetrics

- name: Configure vcpkg binary caching
if: github.repository == 'asfernandes/fb-cpp'
run: |
mono `${{ env.VCPKG_EXE }} fetch nuget | tail -n 1` \
sources add \
-Source "${{ env.FEED_URL }}" \
-StorePasswordInClearText \
-Name GitHubPackages \
-UserName "${{ env.USERNAME }}" \
-Password "${{ secrets.GITHUB_TOKEN }}"
mono `${{ env.VCPKG_EXE }} fetch nuget | tail -n 1` \
setapikey "${{ secrets.GITHUB_TOKEN }}" \
-Source "${{ env.FEED_URL }}"

- name: Configure CMake
run: |
cp CMakeUserPresets.json.posix.template CMakeUserPresets.json
Expand Down Expand Up @@ -119,6 +140,11 @@ jobs:

build-windows:
runs-on: windows-latest
env:
USERNAME: asfernandes
VCPKG_EXE: ${{ github.workspace }}/vcpkg/vcpkg
FEED_URL: https://nuget.pkg.github.com/asfernandes/index.json
VCPKG_BINARY_SOURCES: "clear;nuget,https://nuget.pkg.github.com/asfernandes/index.json,readwrite"
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand Down Expand Up @@ -163,6 +189,21 @@ jobs:
run: |
vcpkg\bootstrap-vcpkg.bat -disableMetrics

- name: Configure vcpkg binary caching
if: github.repository == 'asfernandes/fb-cpp'
shell: pwsh
run: |
.$(${{ env.VCPKG_EXE }} fetch nuget) `
sources add `
-Source "${{ env.FEED_URL }}" `
-StorePasswordInClearText `
-Name GitHubPackages `
-UserName "${{ env.USERNAME }}" `
-Password "${{ secrets.GITHUB_TOKEN }}"
.$(${{ env.VCPKG_EXE }} fetch nuget) `
setapikey "${{ secrets.GITHUB_TOKEN }}" `
-Source "${{ env.FEED_URL }}"

- name: Configure CMake
shell: cmd
run: |
Expand All @@ -189,6 +230,11 @@ jobs:

build-macos:
runs-on: macos-latest
env:
USERNAME: asfernandes
VCPKG_EXE: ${{ github.workspace }}/vcpkg/vcpkg
FEED_URL: https://nuget.pkg.github.com/asfernandes/index.json
VCPKG_BINARY_SOURCES: "clear;nuget,https://nuget.pkg.github.com/asfernandes/index.json,readwrite"
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand All @@ -214,7 +260,8 @@ jobs:
autoconf \
autoconf-archive \
automake \
libtool
libtool \
mono

- name: Install Firebird
run: |
Expand All @@ -233,6 +280,20 @@ jobs:
run: |
./vcpkg/bootstrap-vcpkg.sh -disableMetrics

- name: Configure vcpkg binary caching
if: github.repository == 'asfernandes/fb-cpp'
run: |
mono `${{ env.VCPKG_EXE }} fetch nuget | tail -n 1` \
sources add \
-Source "${{ env.FEED_URL }}" \
-StorePasswordInClearText \
-Name GitHubPackages \
-UserName "${{ env.USERNAME }}" \
-Password "${{ secrets.GITHUB_TOKEN }}"
mono `${{ env.VCPKG_EXE }} fetch nuget | tail -n 1` \
setapikey "${{ secrets.GITHUB_TOKEN }}" \
-Source "${{ env.FEED_URL }}"

- name: Configure CMake
run: |
cp CMakeUserPresets.json.posix.template CMakeUserPresets.json
Expand Down
103 changes: 65 additions & 38 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
- main
workflow_dispatch:

permissions:
packages: write

jobs:
clang-format-check:
runs-on: ubuntu-latest
Expand All @@ -27,25 +30,18 @@ jobs:

build-linux:
runs-on: ubuntu-latest
env:
USERNAME: asfernandes
VCPKG_EXE: ${{ github.workspace }}/vcpkg/vcpkg
FEED_URL: https://nuget.pkg.github.com/asfernandes/index.json
VCPKG_BINARY_SOURCES: "clear;nuget,https://nuget.pkg.github.com/asfernandes/index.json,readwrite"
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0

- name: Cache vcpkg artifacts
uses: actions/cache@v4
with:
path: |
vcpkg/downloads
vcpkg/buildtrees
vcpkg/packages
build/Release/vcpkg_installed
key: ${{ runner.os }}-vcpkg-${{ hashFiles('vcpkg.json', 'vcpkg-configuration.json') }}
restore-keys: |
${{ runner.os }}-vcpkg-

- name: Install system dependencies
run: |
sudo apt-get update
Expand All @@ -59,7 +55,8 @@ jobs:
graphviz \
ninja-build \
libtommath1 \
libtomcrypt1
libtomcrypt1 \
mono-complete

- name: Install Firebird
run: |
Expand All @@ -79,6 +76,20 @@ jobs:
run: |
./vcpkg/bootstrap-vcpkg.sh -disableMetrics

- name: Configure vcpkg binary caching
if: github.repository == 'asfernandes/fb-cpp'
run: |
mono `${{ env.VCPKG_EXE }} fetch nuget | tail -n 1` \
sources add \
-Source "${{ env.FEED_URL }}" \
-StorePasswordInClearText \
-Name GitHubPackages \
-UserName "${{ env.USERNAME }}" \
-Password "${{ secrets.GITHUB_TOKEN }}"
mono `${{ env.VCPKG_EXE }} fetch nuget | tail -n 1` \
setapikey "${{ secrets.GITHUB_TOKEN }}" \
-Source "${{ env.FEED_URL }}"

- name: Configure CMake
run: |
cp CMakeUserPresets.json.posix.template CMakeUserPresets.json
Expand Down Expand Up @@ -106,25 +117,18 @@ jobs:

build-windows:
runs-on: windows-latest
env:
USERNAME: asfernandes
VCPKG_EXE: ${{ github.workspace }}/vcpkg/vcpkg
FEED_URL: https://nuget.pkg.github.com/asfernandes/index.json
VCPKG_BINARY_SOURCES: "clear;nuget,https://nuget.pkg.github.com/asfernandes/index.json,readwrite"
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0

- name: Cache vcpkg artifacts
uses: actions/cache@v4
with:
path: |
vcpkg/downloads
vcpkg/buildtrees
vcpkg/packages
build/vcpkg_installed
key: ${{ runner.os }}-vcpkg-${{ hashFiles('vcpkg.json', 'vcpkg-configuration.json') }}
restore-keys: |
${{ runner.os }}-vcpkg-

- name: Install Firebird
shell: cmd
run: |
Expand All @@ -150,6 +154,21 @@ jobs:
run: |
vcpkg\bootstrap-vcpkg.bat -disableMetrics

- name: Configure vcpkg binary caching
if: github.repository == 'asfernandes/fb-cpp'
shell: pwsh
run: |
.$(${{ env.VCPKG_EXE }} fetch nuget) `
sources add `
-Source "${{ env.FEED_URL }}" `
-StorePasswordInClearText `
-Name GitHubPackages `
-UserName "${{ env.USERNAME }}" `
-Password "${{ secrets.GITHUB_TOKEN }}"
.$(${{ env.VCPKG_EXE }} fetch nuget) `
setapikey "${{ secrets.GITHUB_TOKEN }}" `
-Source "${{ env.FEED_URL }}"

- name: Configure CMake
shell: cmd
run: |
Expand Down Expand Up @@ -178,32 +197,26 @@ jobs:

build-macos:
runs-on: macos-latest
env:
USERNAME: asfernandes
VCPKG_EXE: ${{ github.workspace }}/vcpkg/vcpkg
FEED_URL: https://nuget.pkg.github.com/asfernandes/index.json
VCPKG_BINARY_SOURCES: "clear;nuget,https://nuget.pkg.github.com/asfernandes/index.json,readwrite"
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0

- name: Cache vcpkg artifacts
uses: actions/cache@v4
with:
path: |
vcpkg/downloads
vcpkg/buildtrees
vcpkg/packages
build/Release/vcpkg_installed
key: ${{ runner.os }}-vcpkg-${{ hashFiles('vcpkg.json', 'vcpkg-configuration.json') }}
restore-keys: |
${{ runner.os }}-vcpkg-

- name: Install system dependencies
run: |
brew install \
autoconf \
autoconf-archive \
automake \
libtool
libtool \
mono

- name: Install Firebird
run: |
Expand All @@ -222,6 +235,20 @@ jobs:
run: |
./vcpkg/bootstrap-vcpkg.sh -disableMetrics

- name: Configure vcpkg binary caching
if: github.repository == 'asfernandes/fb-cpp'
run: |
mono `${{ env.VCPKG_EXE }} fetch nuget | tail -n 1` \
sources add \
-Source "${{ env.FEED_URL }}" \
-StorePasswordInClearText \
-Name GitHubPackages \
-UserName "${{ env.USERNAME }}" \
-Password "${{ secrets.GITHUB_TOKEN }}"
mono `${{ env.VCPKG_EXE }} fetch nuget | tail -n 1` \
setapikey "${{ secrets.GITHUB_TOKEN }}" \
-Source "${{ env.FEED_URL }}"

- name: Configure CMake
run: |
cp CMakeUserPresets.json.posix.template CMakeUserPresets.json
Expand Down