blob: 86273befccb6da3f39c6a50f5b2c781daaca1d07 [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-latest
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@v7
with:
ref: ${{ github.sha }}
persist-credentials: false
fetch-depth: 0
- uses: actions/setup-node@v7
with:
node-version: latest
- name: Update Rust
run: rustup update stable --no-self-update
- uses: taiki-e/install-action@68a389c788b2cd04016ce8c80ee23b80d2ab3d68 # v2.88.1
with:
tool: cargo-binstall
- name: Install latest Rust tools
env:
GH_TOKEN: ${{ github.token }}
run: |
cargo binstall --no-confirm --force cargo-binstall
cargo binstall --no-confirm --force just cargo-nextest 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 npm@latest
- 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@v7
with:
name: asf-source-candidate
path: release/asf/*
if-no-files-found: error