Skip to content

build_full

build_full #21

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: build_full
# Controls when the action will run.
on:
#schedule:
# - cron: "0 0 1 * *" # monthly
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# Matrix strategy from
# https://github.com/msys2/MINGW-packages/blob/master/.github/workflows/main.yml
strategy:
fail-fast: false
matrix:
include:
- os: windows-latest
shell: powershell
arch: x86_64
- os: ubuntu-latest
shell: bash
# The type of runner that the job will run on
runs-on: ${{ matrix.os }}
env:
MSYS2_DIR: C:\msys64
EMACS_REPO: https://github.com/emacs-mirror/emacs.git
defaults:
run:
shell: ${{ matrix.shell }}
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
- name: Setup Msys2
uses: msys2/setup-msys2@v2
if: runner.os == 'Windows'
with:
msystem: UCRT64
release: false
# This is the shortest job, but in this case it pulls all MSYS/MINGW64
- name: Clone Emacs
if: runner.os == 'Windows'
run: .\emacs-build.cmd --clone --repo %EMACS_REPO% --depth 1
- name: Clone Emacs
if: runner.os != 'Windows'
run: |
mkdir -p ./git/emacs
cd ./git/emacs/
git clone --depth 1 $EMACS_REPO .
echo "EMACS_COMMIT=`date +'%Y%m%d'`.`git rev-parse --short=7 HEAD`" >> $GITHUB_ENV
echo "EMACS_MAJOR_VER=`cat configure.ac | grep -Po 'AC_INIT\(.*\[\K\d+'`" >> $GITHUB_ENV
- name: Set package version
run: |
echo "EMACS_VER=${{ env.EMACS_MAJOR_VER }}.${{ github.run_number }}.${{ env.EMACS_COMMIT }}" >> $GITHUB_ENV
shell: bash
- name: Build Emacs
if: runner.os == 'Windows'
uses: Wandalen/wretry.action@master
with:
# Require --nativecomp and --with-* flags, else the deps will not be included properly
command: |
.\emacs-build.cmd --nativecomp --slim --with-rsvg --hunspell --build
attempt_limit: 1
attempt_delay: 2000
- name: Package Emacs
if: runner.os == 'Windows'
run: .\emacs-build.cmd --nativecomp --slim --with-rsvg --hunspell --add-additional-files --pack-all
- name: Build and pack Emacs
if: runner.os != 'Windows'
run: |
chmod 755 ./emacs-build-unix.sh
mkdir -p ./zips
#./emacs-build-unix.sh -s ./git/emacs/ -v ${{ env.EMACS_VER }} -d ./zips
# Upload everything
- name: Upload binaries
if: runner.os == 'Windows'
uses: actions/upload-artifact@v4
with:
name: emacs-packages
path: zips/*
if-no-files-found: error
outputs:
version: ${{ env.EMACS_VER }}
publish:
needs: build
runs-on: ubuntu-latest
steps:
- name: Download binaries
uses: actions/download-artifact@v4
with:
name: emacs-packages
- run: ls -R
# Create release
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v2
with:
tag_name: v${{ needs.build.outputs.version }}
name: emacs_${{ needs.build.outputs.version }}
prerelease: false
files: |
*-full.zip
*.deb