Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regen release.yml, update some actions, Drop Fedora 36 and 37, Add Ubuntu 24 and Fedora 39 and 40 #1247

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
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
4 changes: 2 additions & 2 deletions .github/workflows/generate-release-yml.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ fn parse_pattern(pattern: &String) -> Option<(Pattern, Vec<&'static str>)> {
if pattern.contains("%UBUNTU_LTS_VERSION%") {
Some((
Box::new(move |p: &str, s: &str| p.replace("%UBUNTU_LTS_VERSION%", s)),
vec!["20", "22"],
vec!["20", "22", "24"],
))
} else if pattern.contains("%FEDORA_STABLE_VERSION%") {
Some((
Box::new(move |p: &str, s: &str| p.replace("%FEDORA_STABLE_VERSION%", s)),
vec!["36", "37", "38"],
vec!["39", "40", "41"],
))
} else {
None
Expand Down
157 changes: 104 additions & 53 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@ name: release
push:
tags:
- v*

permissions:
contents: write # to create a release

contents: write
packages: write
jobs:
prepare:
runs-on: ubuntu-latest
Expand All @@ -33,17 +32,17 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
username: "${{ github.repository_owner }}"
password: "${{ secrets.GITHUB_TOKEN }}"
- name: Build and push Docker image
uses: docker/build-push-action@v3
uses: docker/build-push-action@v6
with:
context: "."
build-args: UBUNTU_VERSION=20.04
Expand All @@ -54,86 +53,107 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
username: "${{ github.repository_owner }}"
password: "${{ secrets.GITHUB_TOKEN }}"
- name: Build and push Docker image
uses: docker/build-push-action@v3
uses: docker/build-push-action@v6
with:
context: "."
build-args: UBUNTU_VERSION=22.04
file: watchman/build/package/ubuntu-env/Dockerfile
push: true
tags: "${{ format('ghcr.io/{0}/watchman-build-env-ubuntu-22:latest', github.repository) }}"
docker-fedora-36:
docker-ubuntu-24:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
username: "${{ github.repository_owner }}"
password: "${{ secrets.GITHUB_TOKEN }}"
- name: Build and push Docker image
uses: docker/build-push-action@v3
uses: docker/build-push-action@v6
with:
context: "."
build-args: FEDORA_VERSION=36
build-args: UBUNTU_VERSION=24.04
file: watchman/build/package/ubuntu-env/Dockerfile
push: true
tags: "${{ format('ghcr.io/{0}/watchman-build-env-ubuntu-24:latest', github.repository) }}"
docker-fedora-39:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: "${{ github.repository_owner }}"
password: "${{ secrets.GITHUB_TOKEN }}"
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: "."
build-args: FEDORA_VERSION=39
file: watchman/build/package/fedora-env/Dockerfile
push: true
tags: "${{ format('ghcr.io/{0}/watchman-build-env-fedora-36:latest', github.repository) }}"
docker-fedora-37:
tags: "${{ format('ghcr.io/{0}/watchman-build-env-fedora-39:latest', github.repository) }}"
docker-fedora-40:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
username: "${{ github.repository_owner }}"
password: "${{ secrets.GITHUB_TOKEN }}"
- name: Build and push Docker image
uses: docker/build-push-action@v3
uses: docker/build-push-action@v6
with:
context: "."
build-args: FEDORA_VERSION=37
build-args: FEDORA_VERSION=40
file: watchman/build/package/fedora-env/Dockerfile
push: true
tags: "${{ format('ghcr.io/{0}/watchman-build-env-fedora-37:latest', github.repository) }}"
docker-fedora-38:
tags: "${{ format('ghcr.io/{0}/watchman-build-env-fedora-40:latest', github.repository) }}"
docker-fedora-41:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
username: "${{ github.repository_owner }}"
password: "${{ secrets.GITHUB_TOKEN }}"
- name: Build and push Docker image
uses: docker/build-push-action@v3
uses: docker/build-push-action@v6
with:
context: "."
build-args: FEDORA_VERSION=38
build-args: FEDORA_VERSION=41
file: watchman/build/package/fedora-env/Dockerfile
push: true
tags: "${{ format('ghcr.io/{0}/watchman-build-env-fedora-38:latest', github.repository) }}"
tags: "${{ format('ghcr.io/{0}/watchman-build-env-fedora-41:latest', github.repository) }}"
clone-build-package-ubuntu-20:
needs:
- prepare
Expand All @@ -145,7 +165,7 @@ jobs:
- name: Fix HOME
run: echo HOME=/root >> $GITHUB_ENV
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install system dependencies
run: "./install-system-packages.sh"
- name: Fix dubious ownership
Expand Down Expand Up @@ -176,7 +196,7 @@ jobs:
- name: Fix HOME
run: echo HOME=/root >> $GITHUB_ENV
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install system dependencies
run: "./install-system-packages.sh"
- name: Fix dubious ownership
Expand All @@ -196,18 +216,49 @@ jobs:
asset_path: /_debs/watchman.deb
asset_name: "watchman_ubuntu22.04_${{ needs.prepare.outputs.release }}.deb"
asset_content_type: application/x-deb
clone-build-package-fedora-36:
clone-build-package-ubuntu-24:
needs:
- prepare
- docker-ubuntu-24
runs-on: ubuntu-latest
container:
image: "${{ format('ghcr.io/{0}/watchman-build-env-ubuntu-24:latest', github.repository) }}"
steps:
- name: Fix HOME
run: echo HOME=/root >> $GITHUB_ENV
- name: Checkout code
uses: actions/checkout@v4
- name: Install system dependencies
run: "./install-system-packages.sh"
- name: Fix dubious ownership
run: git config --global --add safe.directory /__w/watchman/watchman
- name: Build Watchman binaries
run: "./autogen.sh"
- name: Make .deb
env:
UBUNTU_VERSION: "24.04"
run: "./watchman/build/package/make-deb.sh"
- name: Upload .deb
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
uses: actions/upload-release-asset@v1
with:
upload_url: "${{ needs.prepare.outputs.upload_url }}"
asset_path: /_debs/watchman.deb
asset_name: "watchman_ubuntu24.04_${{ needs.prepare.outputs.release }}.deb"
asset_content_type: application/x-deb
clone-build-package-fedora-39:
needs:
- prepare
- docker-fedora-36
- docker-fedora-39
runs-on: ubuntu-latest
container:
image: "${{ format('ghcr.io/{0}/watchman-build-env-fedora-36:latest', github.repository) }}"
image: "${{ format('ghcr.io/{0}/watchman-build-env-fedora-39:latest', github.repository) }}"
steps:
- name: Fix HOME
run: echo HOME=/root >> $GITHUB_ENV
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install system dependencies
run: "./install-system-packages.sh"
- name: Fix dubious ownership
Expand All @@ -217,7 +268,7 @@ jobs:
- name: Make .rpm
id: make_rpm
env:
FEDORA_VERSION: "36"
FEDORA_VERSION: "39"
run: "./watchman/build/package/make-rpm.sh"
- name: Upload .rpm
env:
Expand All @@ -228,18 +279,18 @@ jobs:
asset_path: "${{ steps.make_rpm.outputs.rpm_path }}"
asset_name: "${{ steps.make_rpm.outputs.rpm_name }}"
asset_content_type: application/x-rpm
clone-build-package-fedora-37:
clone-build-package-fedora-40:
needs:
- prepare
- docker-fedora-37
- docker-fedora-40
runs-on: ubuntu-latest
container:
image: "${{ format('ghcr.io/{0}/watchman-build-env-fedora-37:latest', github.repository) }}"
image: "${{ format('ghcr.io/{0}/watchman-build-env-fedora-40:latest', github.repository) }}"
steps:
- name: Fix HOME
run: echo HOME=/root >> $GITHUB_ENV
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install system dependencies
run: "./install-system-packages.sh"
- name: Fix dubious ownership
Expand All @@ -249,7 +300,7 @@ jobs:
- name: Make .rpm
id: make_rpm
env:
FEDORA_VERSION: "37"
FEDORA_VERSION: "40"
run: "./watchman/build/package/make-rpm.sh"
- name: Upload .rpm
env:
Expand All @@ -260,18 +311,18 @@ jobs:
asset_path: "${{ steps.make_rpm.outputs.rpm_path }}"
asset_name: "${{ steps.make_rpm.outputs.rpm_name }}"
asset_content_type: application/x-rpm
clone-build-package-fedora-38:
clone-build-package-fedora-41:
needs:
- prepare
- docker-fedora-38
- docker-fedora-41
runs-on: ubuntu-latest
container:
image: "${{ format('ghcr.io/{0}/watchman-build-env-fedora-38:latest', github.repository) }}"
image: "${{ format('ghcr.io/{0}/watchman-build-env-fedora-41:latest', github.repository) }}"
steps:
- name: Fix HOME
run: echo HOME=/root >> $GITHUB_ENV
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install system dependencies
run: "./install-system-packages.sh"
- name: Fix dubious ownership
Expand All @@ -281,7 +332,7 @@ jobs:
- name: Make .rpm
id: make_rpm
env:
FEDORA_VERSION: "38"
FEDORA_VERSION: "41"
run: "./watchman/build/package/make-rpm.sh"
- name: Upload .rpm
env:
Expand All @@ -297,7 +348,7 @@ jobs:
needs: prepare
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Build watchman
run: "python3 build/fbcode_builder/getdeps.py build --src-dir=. watchman --project-install-prefix watchman:/usr/local"
- name: Copy artifacts
Expand All @@ -318,9 +369,9 @@ jobs:
mac-build:
continue-on-error: true
needs: prepare
runs-on: macOS-10.15
runs-on: macOS-11
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Build watchman
run: "SDKROOT=$(xcrun --show-sdk-path --sdk macosx11.1) python3 build/fbcode_builder/getdeps.py --allow-system-packages build --src-dir=. watchman --project-install-prefix watchman:/usr/local"
- name: Copy artifacts
Expand All @@ -343,7 +394,7 @@ jobs:
needs: prepare
runs-on: windows-2019
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Export boost environment
run: echo BOOST_ROOT=%BOOST_ROOT_1_69_0% >> %GITHUB_ENV%
shell: cmd
Expand Down
Loading
Loading