Skip to content
Open
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
5 changes: 3 additions & 2 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,11 @@ task:
meson install -C build
cd $CIRRUS_WORKING_DIR/output
tar cvfJ $CIRRUS_WORKING_DIR/"openSeaChest-$branchName-$(uname -s)-$(uname -r)-$(uname -m).tar.xz" *
$CIRRUS_WORKING_DIR/cirrus_ci_post_freebsd_release.sh
# Removing upload to use the VMActions freebsd build instead so we also get SLSA provenance.
# $CIRRUS_WORKING_DIR/cirrus_ci_post_freebsd_release.sh
binaries_artifacts:
path: openSeaChest-*.tar.xz


task:
name: windowsservercore:visualstudio2019
Expand Down
293 changes: 286 additions & 7 deletions .github/workflows/meson.yml
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,149 @@
archive_command: "tar cvfJ",
image: "vonericsen/muslcc@sha256:04b60fc27f45b69896855da46f5be09fa9816b00e9948bf86cc82e56b8ce4468"
}
- {
name: "VMActions OmniOS Build",
os: ubuntu-latest,
cc: "",
cxx: "",
publish_release: true,
release_name: "omnios_r151054-x86_64",
release_extension: ".tar.xz",
archive_command: "tar cvfJ",
vm_actions: true,
vm_release: "r151054",
vm_arch: "x86_64",
}
- {
name: "VMActions Solaris Build",
os: ubuntu-latest,
cc: "gcc",
cxx: "g++",
publish_release: true,
release_name: "solaris_11_4-x86_64",
release_extension: ".tar.xz",
archive_command: "tar cvfJ",
vm_actions: true,
vm_release: "11.4-gcc",
vm_arch: "x86_64",
}
- {
name: "VMActions FreeBSD 14.3 Build (x86_64)",
os: ubuntu-latest,
cc: "",
cxx: "",
publish_release: true,
release_name: "freebsd_14_3-x86_64",
release_extension: ".tar.xz",
archive_command: "tar cvfJ",
vm_actions: true,
vm_release: "14.3",
vm_arch: "x86_64",
}
- {
name: "VMActions FreeBSD 13.5 Build (x86_64)",
os: ubuntu-latest,
cc: "",
cxx: "",
publish_release: true,
release_name: "freebsd_13_5-x86_64",
release_extension: ".tar.xz",
archive_command: "tar cvfJ",
vm_actions: true,
vm_release: "13.5",
vm_arch: "x86_64",
}
- {
name: "VMActions FreeBSD 14.3 Build (aarch64)",
os: ubuntu-latest,
cc: "",
cxx: "",
publish_release: true,
release_name: "freebsd_14_3-aarch64",
release_extension: ".tar.xz",
archive_command: "tar cvfJ",
vm_actions: true,
vm_release: "14.3",
vm_arch: "aarch64",
}
- {
name: "VMActions FreeBSD 13.5 Build (aarch64)",
os: ubuntu-latest,
cc: "",
cxx: "",
publish_release: true,
release_name: "freebsd_13_5-aarch64",
release_extension: ".tar.xz",
archive_command: "tar cvfJ",
vm_actions: true,
vm_release: "13.5",
vm_arch: "aarch64",
}
- {
name: "VMActions DragonFlyBSD latest Build",
os: ubuntu-latest,
cc: "",
cxx: "",
publish_release: true,
release_name: "dragonflybsd-x86_64",
release_extension: ".tar.xz",
archive_command: "tar cvfJ",
vm_actions: true,
vm_release: "",
vm_arch: "x86_64",
}
- {
name: "VMActions OpenBSD latest Build (x86_64)",
os: ubuntu-latest,
cc: "",
cxx: "",
publish_release: true,
release_name: "openbsd-x86_64",
release_extension: ".tar.xz",
archive_command: "tar cvfJ",
vm_actions: true,
vm_release: "",
vm_arch: "x86_64",
}
- {
name: "VMActions OpenBSD latest Build (aarch64)",
os: ubuntu-latest,
cc: "",
cxx: "",
publish_release: true,
release_name: "openbsd-aarch64",
release_extension: ".tar.xz",
archive_command: "tar cvfJ",
vm_actions: true,
vm_release: "",
vm_arch: "aarch64",
}
- {
name: "VMActions NetBSD latest Build (x86_64)",
os: ubuntu-latest,
cc: "",
cxx: "",
publish_release: true,
release_name: "netbsd-x86_64",
release_extension: ".tar.xz",
archive_command: "tar cvfJ",
vm_actions: true,
vm_release: "",
vm_arch: "x86_64",
}
- {
name: "VMActions NetBSD latest Build (aarch64)",
os: ubuntu-latest,
cc: "",
cxx: "",
publish_release: true,
release_name: "netbsd-aarch64",
release_extension: ".tar.xz",
archive_command: "tar cvfJ",
vm_actions: true,
vm_release: "",
vm_arch: "aarch64",
}
outputs: #where hashes need to be stored for slsa provenance
#NOTE: Only doing this for builds with "publish_release: true"
#format is hash-${{release_name}} for the zipped packages
Expand All @@ -208,8 +351,19 @@
hash-linux-armv7l-portable: ${{ steps.hash.outputs.hash-linux-armv7l-portable }}
hash-linux-armv6-portable: ${{ steps.hash.outputs.hash-linux-armv6-portable }}
hash-linux-armv5l-portable: ${{ steps.hash.outputs.hash-linux-armv5l-portable }}
hash-linux-powerpc64-portable: ${{ steps.hash.outputs.hash-linux-powerpc64-portable }}
hash-linux-powerpc64-portable: ${{ steps.hash.outputs.hash-linux-powerpc64-portable }}
hash-linux-powerpc64le-portable: ${{ steps.hash.outputs.hash-linux-powerpc64le-portable }}
hash-omnios_r151054-x86_64: ${{ steps.hash.outputs.hash-omnios_r151054-x86_64 }}
hash-solaris_11_4-x86_64: ${{ steps.hash.outputs.hash-solaris_11_4-x86_64 }}
hash-freebsd_14_3-x86_64: ${{ steps.hash.outputs.hash-freebsd_14_3-x86_64 }}
hash-freebsd_13_5-x86_64: ${{ steps.hash.outputs.hash-freebsd_13_5-x86_64 }}
hash-freebsd_14_3-aarch64: ${{ steps.hash.outputs.hash-freebsd_14_3-aarch64 }}
hash-freebsd_13_5-aarch64: ${{ steps.hash.outputs.hash-freebsd_13_5-aarch64 }}
hash-dragonflybsd-x86_64: ${{ steps.hash.outputs.hash-dragonflybsd-x86_64 }}
hash-openbsd-x86_64: ${{ steps.hash.outputs.hash-openbsd-x86_64 }}
hash-openbsd-aarch64: ${{ steps.hash.outputs.hash-openbsd-aarch64 }}
hash-netbsd-x86_64: ${{ steps.hash.outputs.hash-netbsd-x86_64 }}
hash-netbsd-aarch64: ${{ steps.hash.outputs.hash-netbsd-aarch64 }}

steps:
- uses: actions/checkout@v5
Expand All @@ -229,7 +383,7 @@
$latestRelease = Invoke-WebRequest -Headers $headers 'https://api.github.com/repos/llvm/llvm-project/releases/latest'
$releaseData = $latestRelease.Content | ConvertFrom-Json
$assets = $releaseData.assets | Where-Object { $_.name -like "*win64.exe" }

if ($assets) {
$downloadUrl = $assets.browser_download_url
echo "LLVM_RELID=$($releaseData.id)" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
Expand All @@ -238,7 +392,7 @@
Write-Host "No current Windows build available for the latest release. Searching for previous releases..."
$releases = Invoke-WebRequest -Headers $headers 'https://api.github.com/repos/llvm/llvm-project/releases'
$found = $false

foreach ($release in $releases.Content | ConvertFrom-Json) {
$assets = $release.assets | Where-Object { $_.name -like "*win64.exe" }
if ($assets) {
Expand All @@ -249,7 +403,7 @@
break
}
}

if (-not $found) {
Write-Host "No Windows build available for any recent releases."
exit 0
Expand Down Expand Up @@ -283,14 +437,14 @@
shell: bash

- name: Install Meson and Ninja and Build (MUSL container)
if: matrix.config.image != ''
if: matrix.config.image != '' && matrix.config.vm_actions == false
run: |
meson setup build -Dprefix=/ -Dmandir=/man -Dbindir=/ ${{ matrix.config.meson_opts }} --buildtype=release
meson install -C build


- name: Install Meson and Ninja and Build (Github runners)
if: matrix.config.image == ''
if: matrix.config.image == '' && matrix.config.vm_actions == false
env:
CC: ${{ matrix.config.cc }}
CXX: ${{ matrix.config.cxx }}
Expand All @@ -299,6 +453,130 @@
meson setup build -Dprefix=/ -Dmandir=/man -Dbindir=/ ${{ matrix.config.meson_opts }} --buildtype=release
meson install -C build

- name: Install Meson and Ninja and Build (VMActions OmniOS)
if: matrix.config.vm_actions == true && startsWith(matrix.config.name, 'VMActions OmniOS')
uses: vmactions/omnios-vm@v1

Check warning on line 458 in .github/workflows/meson.yml

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

.github/workflows/meson.yml#L458

An action sourced from a third-party repository on GitHub is not pinned to a full length commit SHA. Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release.
with:
envs: 'DESTDIR'
release: ${{ matrix.config.vm_release }}
arch: ${{ matrix.config.vm_arch }}
usesh: true
prepare: |
pkg install pkg:/package/pkg
pkg update
pkg install socat

run: |
pkg install bison build-essential flex ninja pkg-config

python3 -m pip install --upgrade pip setuptools wheel --root-user-action=ignore
python3 -m pip install meson --root-user-action=ignore
meson setup build -Dprefix=/ -Dmandir=/man -Dbindir=/ ${{ matrix.config.meson_opts }} --buildtype=release
meson install -C build

- name: Install Meson and Ninja and Build (VMActions Solaris)
if: matrix.config.vm_actions == true && startsWith(matrix.config.name, 'VMActions Solaris')
uses: vmactions/solaris-vm@v1

Check warning on line 479 in .github/workflows/meson.yml

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

.github/workflows/meson.yml#L479

An action sourced from a third-party repository on GitHub is not pinned to a full length commit SHA. Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release.
with:
envs: 'DESTDIR'
release: ${{ matrix.config.vm_release }}
arch: ${{ matrix.config.vm_arch }}
usesh: true
prepare: |
pkg update --accept || true
pkgutil -y -i socat

ntpdate -u pool.ntp.org

run: |
pkg install --accept developer/build/meson

meson setup build -Dprefix=/ -Dmandir=/man -Dbindir=/ ${{ matrix.config.meson_opts }} --buildtype=release
meson install -C build

- name: Install Meson and Ninja and Build (VMActions FreeBSD)
if: matrix.config.vm_actions == true && startsWith(matrix.config.name, 'VMActions FreeBSD')
uses: vmactions/freebsd-vm@v1

Check warning on line 499 in .github/workflows/meson.yml

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

.github/workflows/meson.yml#L499

An action sourced from a third-party repository on GitHub is not pinned to a full length commit SHA. Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release.
with:
envs: 'DESTDIR'
release: ${{ matrix.config.vm_release }}
arch: ${{ matrix.config.vm_arch }}
usesh: true
prepare: |
pkg update
pkg install -y curl
pkg install -y ntp
ntpdate -u pool.ntp.org

run: |
pkg install -y meson

meson setup build -Dprefix=/ -Dmandir=/man -Dbindir=/ ${{ matrix.config.meson_opts }} --buildtype=release
meson install -C build

- name: Install Meson and Ninja and Build (VMActions DragonFlyBSD)
if: matrix.config.vm_actions == true && startsWith(matrix.config.name, 'VMActions DragonFlyBSD')
uses: vmactions/dragonflybsd-vm@v1

Check warning on line 519 in .github/workflows/meson.yml

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

.github/workflows/meson.yml#L519

An action sourced from a third-party repository on GitHub is not pinned to a full length commit SHA. Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release.
with:
envs: 'DESTDIR'
release: ${{ matrix.config.vm_release }}
arch: ${{ matrix.config.vm_arch }}
usesh: true
prepare: |
pkg update
pkg install -y socat
/usr/sbin/dntpd -s

run: |
pkg install -y meson

meson setup build -Dprefix=/ -Dmandir=/man -Dbindir=/ ${{ matrix.config.meson_opts }} --buildtype=release
meson install -C build

- name: Install Meson and Ninja and Build (VMActions OpenBSD)
if: matrix.config.vm_actions == true && startsWith(matrix.config.name, 'VMActions OpenBSD')
uses: vmactions/openbsd-vm@v1

Check warning on line 538 in .github/workflows/meson.yml

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

.github/workflows/meson.yml#L538

An action sourced from a third-party repository on GitHub is not pinned to a full length commit SHA. Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release.
with:
envs: 'DESTDIR'
release: ${{ matrix.config.vm_release }}
arch: ${{ matrix.config.vm_arch }}
usesh: true
prepare: |
pkg_add curl

# force a sync in the VM
ntpctl -s status || true


run: |
pkg_add meson

meson setup build -Dprefix=/ -Dmandir=/man -Dbindir=/ ${{ matrix.config.meson_opts }} --buildtype=release
meson install -C build

- name: Install Meson and Ninja and Build (VMActions NetBSD)
if: matrix.config.vm_actions == true && startsWith(matrix.config.name, 'VMActions NetBSD')
uses: vmactions/netbsd-vm@v1

Check warning on line 559 in .github/workflows/meson.yml

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

.github/workflows/meson.yml#L559

An action sourced from a third-party repository on GitHub is not pinned to a full length commit SHA. Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release.
with:
envs: 'DESTDIR'
release: ${{ matrix.config.vm_release }}
arch: ${{ matrix.config.vm_arch }}
usesh: true
prepare: |
/usr/sbin/pkg_add curl
/usr/sbin/pkg_add ntp

# Removed for now because this crashes from errors in a config file for unknown reasons.
# /usr/pkg/sbin/ntpd -gq

run: |
/usr/sbin/pkg_add meson

meson setup build -Dprefix=/ -Dmandir=/man -Dbindir=/ ${{ matrix.config.meson_opts }} --buildtype=release
meson install -C build



# add `GOBIN` to the `PATH` otherwise nfpm in next step can't be found
- uses: actions/setup-go@v6
if: ${{ matrix.config.create_package }}
Expand Down Expand Up @@ -335,6 +613,7 @@
ARCHIVE_EXT: ${{ matrix.config.release_extension }}
run: |
cd build
ls -la
if [[ "${{ matrix.config.os }}" != "windows-latest" ]]; then
if [[ -z "${{ matrix.config.image }}" ]]; then
sudo ${{ matrix.config.archive_command }} "${DESTDIR}${ARCHIVE_EXT}" $DESTDIR
Expand All @@ -354,7 +633,7 @@
else
chown root:root build/"${DESTDIR}${ARCHIVE_EXT}"
fi


- name: Generate Hashes
if: ${{ matrix.config.publish_release }}
Expand Down
Loading
Loading