blob: 39f78b192743d895ca28f3ebfca389a1b961ce37 [file]
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
name: ASF source candidate
on:
workflow_dispatch:
inputs:
version:
description: Exact version from the root package.json
required: true
type: string
permissions:
contents: read
concurrency:
group: asf-source-${{ github.sha }}
cancel-in-progress: false
jobs:
candidate:
runs-on: ubuntu-24.04
timeout-minutes: 60
env:
RELEASE_VERSION: ${{ inputs.version }}
CANDIDATE_PATH: release/asf/apache-maka-${{ inputs.version }}-incubating-src.tar.gz
steps:
- name: Require main
env:
RELEASE_REF: ${{ github.ref }}
run: test "$RELEASE_REF" = refs/heads/main
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: ${{ github.sha }}
persist-credentials: false
fetch-depth: 0
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: '24'
- name: Update Rust
run: rustup update stable --no-self-update
- uses: taiki-e/install-action@1ed6d7be6168f6c9046541087ff549b6bc581fdf # v2
with:
tool: just@1.58.0,cargo-nextest@0.9.146,cargo-deny
- name: Install native dependencies
run: |
sudo apt-get update
sudo apt-get install -y bubblewrap ripgrep pkg-config libx11-dev libxi-dev libxtst-dev libxext-dev
sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
- name: Select npm
run: npm install --global --no-audit --no-fund "$(node -p 'require("./package.json").packageManager')"
- name: Create source candidate
run: just source "$RELEASE_VERSION" "$GITHUB_SHA"
- name: Extract exact candidate
run: |
mkdir candidate-source
tar -xzf "$CANDIDATE_PATH" --strip-components=1 -C candidate-source
- name: Audit extracted source
working-directory: candidate-source
run: node scripts/asf-license-headers.mjs check --report
- name: Install extracted dependencies
working-directory: candidate-source
run: just setup
- name: Verify extracted source
working-directory: candidate-source
run: |
just check
just build
target/debug/maka --version
- name: Verify website
working-directory: candidate-source
run: |
just website-setup
just website-check
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: asf-source-candidate
path: release/asf/*
if-no-files-found: error