Skip to content

hpplib

hpplib #486

Workflow file for this run

name: hpplib
on:
schedule:
# 毎日 09:00 JST
- cron: "0 0 * * *"
workflow_dispatch:
env:
ASSETS_URL: "https://api.github.com/repos/melpon/wandbox-builder/releases/178117642/assets"
UPLOAD_URL: "https://uploads.github.com/repos/melpon/wandbox-builder/releases/178117642/assets{?name,label}"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
header-only-libraries:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
# Argument Parser
- uses: ./.github/actions/fetch-hpp
with:
name: CLI11
repository: CLIUtils/CLI11
header_description: <CLI/CLI.hpp>
header_dir: include
hpplib_dir: /opt/wandbox/hpplib
hpplib_info: /opt/wandbox/hpplib.json
- uses: ./.github/actions/fetch-hpp
with:
name: cxxopts
repository: jarro2783/cxxopts
header_description: <cxxopts.hpp>
header_dir: include
find_args: "-name '*.hpp'"
hpplib_dir: /opt/wandbox/hpplib
hpplib_info: /opt/wandbox/hpplib.json
# Benchmarking
- uses: ./.github/actions/fetch-hpp
with:
name: nanobench
repository: martinus/nanobench
header_description: <nanobench.h>
header_dir: src/include
find_args: "-name '*.h'"
hpplib_dir: /opt/wandbox/hpplib
hpplib_info: /opt/wandbox/hpplib.json
# Data Formats
- uses: ./.github/actions/fetch-hpp
with:
name: toml11
repository: ToruNiina/toml11
header_description: <toml.hpp>
header_dir: include
hpplib_dir: /opt/wandbox/hpplib
hpplib_info: /opt/wandbox/hpplib.json
- uses: ./.github/actions/fetch-hpp
with:
name: toml++
repository: marzer/tomlplusplus
header_description: <toml++/toml.hpp>
header_dir: include
find_args: "-path './toml++/*'"
hpplib_dir: /opt/wandbox/hpplib
hpplib_info: /opt/wandbox/hpplib.json
- uses: ./.github/actions/fetch-hpp
with:
name: rapidjson
repository: Tencent/rapidjson
header_description: <rapidjson/rapidjson.h>
header_dir: include
hpplib_dir: /opt/wandbox/hpplib
hpplib_info: /opt/wandbox/hpplib.json
- uses: ./.github/actions/fetch-hpp
with:
name: picojson
repository: kazuho/picojson
header_description: <picojson.h>
header_dir: .
find_args: "-name picojson.h"
hpplib_dir: /opt/wandbox/hpplib
hpplib_info: /opt/wandbox/hpplib.json
- uses: ./.github/actions/fetch-hpp
with:
name: nlohmann/json
repository: nlohmann/json
header_description: <nlohmann/json.hpp>
header_dir: include
hpplib_dir: /opt/wandbox/hpplib
hpplib_info: /opt/wandbox/hpplib.json
- uses: ./.github/actions/fetch-hpp
with:
name: csv-parser
repository: vincentlaucsb/csv-parser
header_description: <csv.hpp>
header_dir: single_include
hpplib_dir: /opt/wandbox/hpplib
hpplib_info: /opt/wandbox/hpplib.json
- uses: ./.github/actions/fetch-hpp
with:
name: rapidcsv
repository: d99kris/rapidcsv
header_description: <rapidcsv.h>
header_dir: src
hpplib_dir: /opt/wandbox/hpplib
hpplib_info: /opt/wandbox/hpplib.json
# Data Formatting and Presentation
- uses: ./.github/actions/fetch-hpp
with:
name: fmt
repository: fmtlib/fmt
header_description: <fmt/core.h>
header_dir: include
hpplib_dir: /opt/wandbox/hpplib
hpplib_info: /opt/wandbox/hpplib.json
# Mathematics
- uses: ./.github/actions/fetch-hpp
with:
name: NumCpp
repository: dpilger26/NumCpp
header_description: <NumCpp.hpp>
header_dir: include
hpplib_dir: /opt/wandbox/hpplib
hpplib_info: /opt/wandbox/hpplib.json
# Logging
- uses: ./.github/actions/fetch-hpp
with:
name: spdlog
repository: gabime/spdlog
header_description: <spdlog/spdlog.h>
header_dir: include
hpplib_dir: /opt/wandbox/hpplib
hpplib_info: /opt/wandbox/hpplib.json
# Standard/Support Libraries
- uses: ./.github/actions/fetch-hpp
with:
name: expected-lite
repository: martinmoene/expected-lite
header_description: <nonstd/expected.hpp>
header_dir: include
hpplib_dir: /opt/wandbox/hpplib
hpplib_info: /opt/wandbox/hpplib.json
- uses: ./.github/actions/fetch-hpp
with:
name: gsl-lite
repository: gsl-lite/gsl-lite
header_description: <gsl/gsl-lite.hpp>
header_dir: include
find_args: "-path ./gsl/gsl-lite.hpp"
hpplib_dir: /opt/wandbox/hpplib
hpplib_info: /opt/wandbox/hpplib.json
# Testing Frameworks
- uses: ./.github/actions/fetch-hpp
with:
name: ut
repository: boost-ext/ut
header_description: <boost/ut.hpp>
header_dir: include
hpplib_dir: /opt/wandbox/hpplib
hpplib_info: /opt/wandbox/hpplib.json
# Release
- run: tar czf hpplib.tar.gz hpplib/
working-directory: /opt/wandbox
- name: Release hpplib.tar.gz
uses: ./.github/actions/upload-release-asset
with:
upload_url: ${{ env.UPLOAD_URL }}
asset_path: /opt/wandbox/hpplib.tar.gz
asset_name: hpplib.tar.gz
asset_content_type: application/gzip
- name: Release hpplib.json
uses: ./.github/actions/upload-release-asset
with:
upload_url: ${{ env.UPLOAD_URL }}
asset_path: /opt/wandbox/hpplib.json
asset_name: hpplib.json
asset_content_type: application/gzip
_deploy:
needs: [header-only-libraries]
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
# SSH 秘密鍵の登録
- name: Register SSH key
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
run: |
mkdir -p $HOME/.ssh
echo "$SSH_PRIVATE_KEY" > $HOME/.ssh/id_ed25519
chmod 600 $HOME/.ssh/id_ed25519
# デプロイ先を設定する
- name: Add SSH config
env:
SSH_HOST: ${{ secrets.SSH_HOST_UBUNTU_24_04 }}
SSH_USER: ${{ secrets.SSH_USER }}
run: |
echo "Host wandbox-ubuntu-24.04" >> $HOME/.ssh/config
echo " HostName $SSH_HOST" >> $HOME/.ssh/config
echo " User $SSH_USER" >> $HOME/.ssh/config
echo " ServerAliveInterval 60" >> $HOME/.ssh/config
echo " TCPKeepAlive yes" >> $HOME/.ssh/config
ssh-keyscan -H $SSH_HOST >> $HOME/.ssh/known_hosts
# hpplib をダウンロードしてデプロイ先に配置するだけ
- name: Deploy
run: |
HPPLIB_URL=`curl -L ${{ env.ASSETS_URL }} | jq -r '.[] | select(.name == "hpplib.tar.gz") | .browser_download_url'`
HPPLIB_JSON_URL=`curl -L ${{ env.ASSETS_URL }} | jq -r '.[] | select(.name == "hpplib.json") | .browser_download_url'`
curl -fLO $HPPLIB_URL
curl -fLO $HPPLIB_JSON_URL
tar xf hpplib.tar.gz
rsync -a -v hpplib/ wandbox-ubuntu-24.04:/opt/wandbox/hpplib/
rsync -a -v --mkpath hpplib.json wandbox-ubuntu-24.04:/opt/wandbox-data/wandbox-hpplib/hpplib.json