Publish #32
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish | |
on: | |
push: | |
tags: | |
- 'v*' | |
jobs: | |
prepare: | |
runs-on: ubuntu-latest | |
permissions: write-all | |
steps: | |
- name: Make release | |
uses: softprops/action-gh-release@v1 | |
id: create_release | |
with: | |
draft: true | |
prerelease: false | |
body: ...edit me... | |
selfhosted: | |
concurrency: ${{ matrix.remote_host }} | |
runs-on: [self-hosted, server] | |
needs: prepare | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- remote_host: debian-11 | |
installer: deb-systemd | |
- remote_host: debian-11-arm | |
installer: deb-systemd | |
- remote_host: debian-11-armhf | |
installer: deb-systemd | |
# - remote_host: ubuntu-20.04-arm | |
# installer: deb-systemd | |
# - remote_host: ubuntu-22.04-arm | |
# installer: deb-systemd | |
# - remote_host: ubuntu-23.04 | |
# installer: deb-systemd | |
# - remote_host: ubuntu-23.04-arm | |
# installer: deb-systemd | |
- remote_host: freebsd-13.1 | |
installer: bsd | |
# - remote_host: freebsd-13.1-arm | |
# installer: bsd | |
# - remote_host: centos-9 | |
# installer: rpm-systemd | |
# - remote_host: centos-9-arm | |
# installer: rpm-systemd | |
steps: | |
- name: Run remote build | |
run: | | |
"$RUNNER_TOOLS_PATH"/run-agent gh-${{ matrix.remote_host }} <<'EOF' | |
set -e | |
cd work/wsdd-native | |
git fetch --all | |
git fetch -f --prune --tags | |
git reset --hard ${{ github.sha }} | |
if [[ '${{ matrix.remote_host }}' == 'ubuntu-20.04-arm' ]]; then | |
export CC=gcc-10 | |
export CXX=g++-10 | |
fi | |
if [[ '${{ matrix.installer }}' == 'rpm-systemd' ]]; then | |
export PGP_KEY_NAME='${{ secrets.PGP_KEY_NAME }}' | |
export PGP_KEY_PASSWD='${{ secrets.PGP_KEY_PASSWD }}' | |
fi | |
export GH_TOKEN=${{ secrets.GITHUB_TOKEN }} | |
if [[ '${{ matrix.remote_host }}' == 'freebsd-13.1' ]]; then | |
mkdir -p out | |
echo "::group::AMD64" | |
[ -d "out/amd64" ] && tools/uncache out/amd64 | |
cmake -S . -B out/amd64 -DCMAKE_BUILD_TYPE=RelWithDebInfo | |
installers/${{ matrix.installer }}/build.py --upload-results . out/amd64 | |
echo "::endgroup::" | |
echo "::group::ARM64" | |
installers/bsd/make-toolchain.py arm64 out/toolchain-arm64 | |
[ -d "out/arm64" ] && tools/uncache out/arm64 | |
cmake -S . -B out/arm64 -DCMAKE_TOOLCHAIN_FILE=out/toolchain-arm64/toolchain.cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo | |
installers/${{ matrix.installer }}/build.py --arch=aarch64 --upload-results . out/arm64 | |
echo "::endgroup::" | |
else | |
[ -d "out" ] && tools/uncache out | |
cmake -S . -B out -DCMAKE_BUILD_TYPE=RelWithDebInfo | |
installers/${{ matrix.installer }}/build.py --upload-results . out | |
fi | |
EOF | |
local: | |
runs-on: ${{ matrix.os }} | |
needs: prepare | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ | |
# ubuntu-22.04, | |
# ubuntu-20.04, | |
macos-latest | |
] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Collect System Info | |
id: system-info | |
uses: kenchan0130/actions-system-info@master | |
- name: Cache Build Dir | |
id: cache-build-dir | |
uses: actions/cache@v3 | |
with: | |
path: out | |
key: ${{ runner.os }}-${{ steps.system-info.outputs.release }}-out | |
- name: Setup Linux | |
if: runner.os == 'Linux' | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libsystemd-dev | |
if [[ '${{ matrix.os }}' == 'ubuntu-20.04' ]]; then | |
echo "CC=gcc-10" >> $GITHUB_ENV | |
echo "CXX=g++-10" >> $GITHUB_ENV | |
fi | |
- name: Configure | |
run: | | |
[ -d "out" ] && tools/uncache out | |
cmake -S . -B out \ | |
-DCMAKE_BUILD_TYPE=RelWithDebInfo \ | |
"-DCMAKE_OSX_ARCHITECTURES=x86_64;arm64" \ | |
-DWSDDN_MACOS_BUILD_WRAPPER=ON | |
- name: Make Distribution | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }} | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
if [[ '${{ runner.os }}' == 'Linux' ]]; then | |
installers/deb-systemd/build.py --upload-results . out | |
elif [[ '${{ runner.os }}' == 'macOS' ]]; then | |
export SIGN_CERTIFICATE='${{ secrets.SIGN_CERTIFICATE }}' | |
export SIGN_CERTIFICATE_PWD='${{ secrets.SIGN_CERTIFICATE_PWD }}' | |
export KEYCHAIN_PWD='${{ secrets.KEYCHAIN_PWD }}' | |
export NOTARIZE_USER='${{ secrets.NOTARIZE_USER }}' | |
export NOTARIZE_PWD='${{ secrets.NOTARIZE_PWD }}' | |
installers/mac/set-github-keychain | |
installers/mac/build.py --upload-results . out | |
fi |