Skip to content

Backport TUF security bugfix to 3.6 #3039

Backport TUF security bugfix to 3.6

Backport TUF security bugfix to 3.6 #3039

Workflow file for this run

name: Artifacts
on:
push:
branches:
- master
pull_request:
release:
types:
- created
jobs:
artifact-linux:
name: Artifact on Linux
runs-on: ubuntu-18.04
container:
# Older Ubuntu for older glibc
image: phadej/ghc:8.6.5-xenial
steps:
- name: Set PATH
run: |
echo "$HOME/.cabal/bin" >> $GITHUB_PATH
- name: Install newer Python3
run: |
add-apt-repository ppa:deadsnakes/ppa
apt-get update
apt-get install -y python3.8
- uses: actions/checkout@v2
- name: Package project
run: |
cabal v2-sdist --builddir=sdist Cabal cabal-install
python3.8 release.py --tarlib=sdist/sdist/Cabal-*.tar.gz --tarexe=sdist/sdist/cabal-install-*.tar.gz
- uses: actions/upload-artifact@v2
with:
name: cabal-linux
path: _build/artifacts/*
artifact-macos:
name: Artifact on macOS
runs-on: macos-latest
steps:
- name: Install GHC
run: |
cd $(mktemp -d)
curl -sLO "https://downloads.haskell.org/~ghc/8.6.5/ghc-8.6.5-x86_64-apple-darwin.tar.xz"
tar -xJf ghc-*.tar.xz
cd ghc-*
./configure --prefix=/opt/ghc/8.6.5
sudo make install
- name: Install Cabal
run: |
cd $(mktemp -d)
curl -sLO http://oleg.fi/cabal-install-3.4.0.0-rc1/cabal-install-3.4.0.0-x86_64-darwin-sierra.tar.xz
tar -xJf cabal-install-*.tar.xz
sudo mkdir -p /opt/cabal/3.4/bin
sudo cp cabal /opt/cabal/3.4/bin/cabal
sudo chmod 755 /opt/cabal/3.4/bin/cabal
- name: Set PATH
run: |
echo "/opt/ghc/8.6.5/bin" >> $GITHUB_PATH
echo "/opt/cabal/3.4/bin" >> $GITHUB_PATH
echo "$HOME/.cabal/bin" >> $GITHUB_PATH
- uses: actions/checkout@v2
- name: Package project
run: |
cabal v2-sdist --builddir=sdist Cabal cabal-install
python3 release.py --tarlib=sdist/sdist/Cabal-*.tar.gz --tarexe=sdist/sdist/cabal-install-*.tar.gz
- uses: actions/upload-artifact@v2
with:
name: cabal-macos
path: _build/artifacts/*
artifact-windows:
name: Artifact on Windows
runs-on: windows-latest
steps:
- name: Install Cabal
run: choco install -fy cabal --version 3.0.0.0
- name: Install GHC
run: |
choco uninstall -y ghc
choco install -y ghc --version 8.6.5
- name: Set PATH
run: |
[Environment]::GetEnvironmentVariable("Path")
Write-Output "C:\ProgramData\chocolatey\lib\cabal\tools\cabal-3.0.0.0" | Out-File $Env:GITHUB_PATH
Write-Output "C:\ProgramData\chocolatey\lib\ghc\tools\ghc-8.6.5\bin" | Out-File $Env:GITHUB_PATH
- name: Print versions
run: |
ghc --version
cabal --version
cabal user-config init -a "http-transport: plain-http" -a "store-dir: C:\SR" -f -v3
- uses: actions/checkout@v2
- name: Package project
# We hardcode version 3 here to make first glob not overlap with cabal-install
run: |
cabal v2-sdist --builddir=sdist Cabal cabal-install
New-Item -Path "_build" -ItemType "directory"
python release.py --tarlib=$(Resolve-Path -Path sdist/sdist/Cabal-3.*.tar.gz) --tarexe=$(Resolve-Path -Path sdist/sdist/cabal-install-3.*.tar.gz)
- uses: actions/upload-artifact@v2
with:
name: cabal-windows
path: _build/artifacts/*