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
79 changes: 22 additions & 57 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,28 @@ on:
description: 'Restore vcpkg export from cache'
type: boolean
default: true
schedule:
- cron: '10 21 * * 1,4'
workflow_call:
inputs:
target_pattern:
description: 'Build jobs matching this pattern'
type: string
default: "^"
outputs:
arm64-android:
description: 'arm64-android package key'
value: ${{ jobs.arm64-android.outputs.package }}
arm64-macos:
description: 'arm64-macos package key'
value: ${{ jobs.arm64-macos.outputs.package }}
x64-android:
description: 'x64-android package key'
value: ${{ jobs.x64-android.outputs.package }}
x64-macos:
description: 'x64-macos package key'
value: ${{ jobs.x64-macos.outputs.package }}
x64-windows:
description: 'x64-windows package key'
value: ${{ jobs.x64-windows.outputs.package }}

concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
Expand Down Expand Up @@ -166,58 +186,3 @@ jobs:
-DVCPKG_CRT_LINKAGE=dynamic
-DCMAKE_C_COMPILER=cl
-DCMAKE_CXX_COMPILER=cl

# Uploads to GH releases need permissions:{content:write}.
# A GHA "environment" is used to gate when to run this sensitive job.
upload-packages:
name: Upload Mapper packages
needs: [ arm64-android, arm64-macos, x64-android, x64-macos, x64-windows ]
if: ${{ inputs.upload_release }}
runs-on: ubuntu-24.04
environment:
name: Release
deployment: false
permissions:
contents: write
steps:
- name: checkout
uses: actions/checkout@v6.1.0
with:
persist-credentials: false
- name: Restore arm64-android packages
uses: actions/cache/restore@v5
with:
path: build/OpenOrienteering-Mapper-*
key: ${{ needs.arm64-android.outputs.package }}
fail-on-cache-miss: true
- name: Restore arm64-macos packages
uses: actions/cache/restore@v5
with:
path: build/OpenOrienteering-Mapper-*
key: ${{ needs.arm64-macos.outputs.package }}
fail-on-cache-miss: true
- name: Restore x64-android packages
uses: actions/cache/restore@v5
with:
path: build/OpenOrienteering-Mapper-*
key: ${{ needs.x64-android.outputs.package }}
fail-on-cache-miss: true
- name: Restore x64-osx packages
uses: actions/cache/restore@v5
with:
path: build/OpenOrienteering-Mapper-*
key: ${{ needs.x64-macos.outputs.package }}
fail-on-cache-miss: true
- name: Restore x64-windows packages
uses: actions/cache/restore@v5
with:
path: build/OpenOrienteering-Mapper-*
key: ${{ needs.x64-windows.outputs.package }}
fail-on-cache-miss: true
- name: gh release upload packages
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -e
gh release create --draft --title packages packages || true
gh release upload --clobber packages build/OpenOrienteering-Mapper-*
66 changes: 66 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Release

on:
workflow_dispatch:
inputs:
restore_export:
description: 'Restore vcpkg export from cache'
type: boolean
default: true

jobs:
build:
permissions: {}
uses: $/.github/workflows/ci.yml

upload-packages:
name: Upload Mapper packages
needs: build
runs-on: ubuntu-24.04
environment:
name: Release
deployment: false
permissions:
contents: write
steps:
- name: checkout
uses: actions/checkout@v6.1.0
with:
persist-credentials: false
- name: Restore arm64-android packages
uses: actions/cache/restore@v5
with:
path: build/OpenOrienteering-Mapper-*
key: ${{ needs.build.outputs.arm64-android }}
fail-on-cache-miss: true
- name: Restore arm64-macos packages
uses: actions/cache/restore@v5
with:
path: build/OpenOrienteering-Mapper-*
key: ${{ needs.build.outputs.arm64-macos }}
fail-on-cache-miss: true
- name: Restore x64-android packages
uses: actions/cache/restore@v5
with:
path: build/OpenOrienteering-Mapper-*
key: ${{ needs.build.outputs.x64-android }}
fail-on-cache-miss: true
- name: Restore x64-osx packages
uses: actions/cache/restore@v5
with:
path: build/OpenOrienteering-Mapper-*
key: ${{ needs.build.outputs.x64-macos }}
fail-on-cache-miss: true
- name: Restore x64-windows packages
uses: actions/cache/restore@v5
with:
path: build/OpenOrienteering-Mapper-*
key: ${{ needs.build.outputs.x64-windows }}
fail-on-cache-miss: true
- name: gh release upload packages
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -e
gh release create --draft --title packages packages || true
gh release upload --clobber packages build/OpenOrienteering-Mapper-*
11 changes: 11 additions & 0 deletions .github/workflows/scheduled.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: CI (scheduled)

on:
schedule:
- cron: '10 21 * * 1,4'

permissions: {}

jobs:
ci:
uses: $/.github/workflows/ci.yml
Loading