Skip to content

Update the last known envoy #127

Update the last known envoy

Update the last known envoy #127

Workflow file for this run

# `name` value will appear "as is" in the badge.
# See https://docs.github.com/en/actions/configuring-and-managing-workflows/configuring-a-workflow#adding-a-workflow-status-badge-to-your-repository
# yamllint --format github .github/workflows/packaging.yaml
---
name: "packaging"
on:
push: # We run tests on non-tagged pushes to master
tags: ''
branches: master
paths:
- 'packaging/msi/*'
- 'packaging/nfpm/*'
- 'packaging/[email protected]'
- '.github/workflows/packaging.yaml'
- 'Makefile'
- 'Tools.mk'
pull_request: # We also run tests on pull requests targeted at the master branch
branches: master
paths:
- 'packaging/msi/*'
- 'packaging/nfpm/*'
- 'packaging/[email protected]'
- '.github/workflows/packaging.yaml'
- 'Makefile'
- 'Tools.mk'
# workflow_dispatch will let us manually trigger the workflow from GitHub actions dashboard.
# For example, you can try to build a branch without raising a pull request.
# See https://docs.github.com/en/free-pro-team@latest/actions/managing-workflow-runs/manually-running-a-workflow
workflow_dispatch:
defaults:
run: # use bash for all operating systems unless overridden
shell: bash
jobs:
packaging:
name: "Test packaging build (${{ matrix.os }})"
runs-on: windows-2022
strategy:
fail-fast: false # don't fail fast as sometimes failures are operating system specific
steps:
- name: "Setup msitools, wixtoolset, osslsigncode"
run: |
choco install osslsigncode -y
choco install zip -y
echo "$WIX\\bin" >> $GITHUB_PATH
echo "${HOME}\\osslsigncode" >> $GITHUB_PATH
env: # `gh` requires auth even on public releases
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: "Checkout"
uses: actions/checkout@v3
- name: "Cache Go"
uses: actions/cache@v3
with:
path: ~/go/pkg/mod
# go.mod for go release version, go.sum for modules used, and Tools.mk for 'go run' tools
key: test-${{ runner.os }}-go-${{ hashFiles('go.mod', 'go.sum', 'Tools.mk') }}
restore-keys: test-${{ runner.os }}-go-
- name: "Build packages (Windows Installer, Debian, RPM)"
run: make dist
# This tests the manifest via yamllint because validation via winget requires too much setup.
# See https://github.com/microsoft/winget-cli/issues/754#issuecomment-896475895
- name: "Test winget manifest generation"
run: |
./packaging/msi/winget_manifest.sh > Tetrate.func-e.yaml
yamllint -sd '{extends: default, rules: {line-length: disable}}' Tetrate.func-e.yaml
# In order to share the built artifacts in the subsequent tests, we use cache instead of actions/upload-artifacts.
# The reason is that upload-artifacts are not globally consistent and sometimes pre_release_test won't be able to
# find the artifacts uploaded here. See https://github.com/actions/upload-artifact/issues/21 for more context.
# Downside of this is that, we pressure the cache capacity set per repository. We delete all caches created
# on PRs on close. See .github/workflows/clear_cache.yaml. On main branch, in any way this cache will be deleted
# in 7 days, also this at most a few MB, so this won't be an issue.
- uses: actions/cache@v3
id: cache
with:
# Use share the cache containing archives across OSes.
enableCrossOsArchive: true
# Note: this creates a cache per run.
key: release-artifacts-${{ github.run_id }}
path:
dist/
# pre_release_test tests the artifacts built by pre_release in the OS dependent way.
pre_release_test:
needs: pre_release

Check failure on line 94 in .github/workflows/packaging.yaml

View workflow run for this annotation

GitHub Actions / packaging

Invalid workflow file

The workflow is not valid. .github/workflows/packaging.yaml (Line: 94, Col: 12): Job 'pre_release_test' depends on unknown job 'pre_release'.
name: Pre-release test (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false # don't fail fast as sometimes failures are arch/OS specific
matrix:
os: [ubuntu-22.04, macos-12, windows-2022]
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
id: cache
with:
# We need this cache to run tests.
fail-on-cache-miss: true
enableCrossOsArchive: true
key: release-artifacts-${{ github.run_id }}
path:
dist/
# This only checks the installer when built on Windows as it is simpler than switching OS.
# refreshenv is from choco, and lets you reload ENV variables (used here for PATH).
- name: "Test Windows Installer (Windows)"
if: runner.os == 'Windows'
run: call packaging\msi\verify_msi.cmd
shell: cmd
- name: "Test Debian package"
if: runner.os == 'Linux'
run: packaging/nfpm/verify_deb.sh
- name: "Test RPM package (CentOS)"
if: runner.os == 'Linux'
run: docker run --rm -v $PWD:/work --entrypoint packaging/nfpm/verify_rpm.sh ${CENTOS_IMAGE}
env: # CENTOS_IMAGE was built by internal-images.yaml
CENTOS_IMAGE: ghcr.io/tetratelabs/func-e-internal:centos-9