<pre style='margin:0'>
Clemens Lang (neverpanic) pushed a commit to branch release-2.6
in repository macports-base.
</pre>
<p><a href="https://github.com/macports/macports-base/commit/7ce065d9d4217686e17ce5abacff6295eaa4b06c">https://github.com/macports/macports-base/commit/7ce065d9d4217686e17ce5abacff6295eaa4b06c</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit 7ce065d9d4217686e17ce5abacff6295eaa4b06c
</span>Author: Clemens Lang <cal@macports.org>
AuthorDate: Wed Dec 9 21:41:22 2020 +0100
<span style='display:block; white-space:pre;color:#404040;'> ci: Add GitHub Actions, Azure Pipelines CI
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Drop the Travis builds and move to GitHub Actions for 10.15 and 11.
</span><span style='display:block; white-space:pre;color:#404040;'> GitHub Actions does not provide 10.14 images, so add Azure Pipelines for
</span><span style='display:block; white-space:pre;color:#404040;'> 10.14 as long as they still provide it.
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> These new CI steps perform configuration, build, installation and test
</span><span style='display:block; white-space:pre;color:#404040;'> in separate steps, which gives us (a) better reporting, and (b) a better
</span><span style='display:block; white-space:pre;color:#404040;'> user experience.
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Additionally, this obsoletes the current re-deployment procedure of the
</span><span style='display:block; white-space:pre;color:#404040;'> macports-ports CI environment that involved merging newly released tags
</span><span style='display:block; white-space:pre;color:#404040;'> into a special branch; this step is now replaced by two conditional
</span><span style='display:block; white-space:pre;color:#404040;'> steps in the CI that will run for pushed tags and perform the necessary
</span><span style='display:block; white-space:pre;color:#404040;'> steps automatically.
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> (cherry picked from commit 552f6db84e01898da5dfe5f83bb08844764860ff)
</span>---
.github/azure-workflows/main.yml | 86 ++++++++++++++++++++++++++++++++++++++++
.github/workflows/main.yml | 85 +++++++++++++++++++++++++++++++++++++++
2 files changed, 171 insertions(+)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/.github/azure-workflows/main.yml b/.github/azure-workflows/main.yml
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000..1b9ceb2c
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/.github/azure-workflows/main.yml
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,86 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+trigger:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ branches:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ include:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ - "*"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ tags:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ include:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ - "v*"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+pr:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ - "*"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+jobs:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ - job: build_and_test_base
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ displayName: "Build & Test MacPorts Base"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ timeoutInMinutes: 0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ pool:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ vmImage: 'macOS-10.14'
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ steps:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ - checkout: self
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ displayName: "Checkout repository"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ fetchDepth: 64
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ - bash: |
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sudo mkdir /opt/local.old
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sudo mv /usr/local/* /opt/local.old
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ displayName: "Cleanup /usr/local"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ - bash: |
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set -eu
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ./configure
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ displayName: "Configure MacPorts Base"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ - bash: |
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set -eu
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ make
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ displayName: "Build MacPorts Base"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ - bash: |
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set -eu
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sudo make install
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ displayName: "Install MacPorts Base"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ - bash: |
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set -eu
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ make test
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ displayName: "Test MacPorts Base"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ - bash: |
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set -eu
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sed -i "" "s/-v selfupdate/version/" portmgr/dmg/postflight
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sudo install -d -m755 /opt/local/libexec/macports/postflight
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sudo install -m755 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ portmgr/dmg/postflight \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /opt/local/libexec/macports/postflight/
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sudo install -m644 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ src/*.tcl \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /opt/local/libexec/macports/postflight/
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ tar \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --exclude '/opt/local/var/macports/sip-workaround/?*' \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -cjf "MacPorts.tar.bz2" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /opt/local
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ condition: and(succeeded(), or(eq(variables['Build.SourceBranch'], 'refs/heads/travis-ci'), startsWith(variables['Build.SourceBranch'], 'refs/tags/v')))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ displayName: "Prepare Deployment"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ - bash: |
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set -eu
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # printf is a built-in, so this won't show up in ps(1)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ printf \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "machine api.bintray.com\n\tlogin %s\n\tpassword %s\n" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "$user" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "$pass" > ~/.netrc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ chmod 600 ~/.netrc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ os_major=$(uname -r | cut -f 1 -d .)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ macports_version=$(cat config/macports_version)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sha256=$(openssl dgst -sha256 -binary "MacPorts.tar.bz2" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ | xxd -ps -c256)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ curl \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --upload-file "MacPorts.tar.bz2" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --netrc \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --header "X-Checksum-Sha2: ${sha256}" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --header "X-Bintray-Package: MacPorts" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --header "X-Bintray-Version: ${macports_version}" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --header "X-Bintray-Publish: 1" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --header "X-Bintray-Override: 1" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "https://api.bintray.com/content/macports-ci-env/macports-base/MacPorts-${os_major}.tar.bz2"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ env:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ user: "macports-ci-env"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ pass: $(BINTRAY_API_TOKEN)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ condition: and(succeeded(), or(eq(variables['Build.SourceBranch'], 'refs/heads/travis-ci'), startsWith(variables['Build.SourceBranch'], 'refs/tags/v')))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ displayName: "Deploy to bintray"
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000..88a0dc8f
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/.github/workflows/main.yml
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,85 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+---
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+name: "Build & Test MacPorts Base"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+on:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ - push
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ - pull_request
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+jobs:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ build:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ name: "Build & Test MacPorts Base"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ runs-on: ${{ matrix.os }}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ strategy:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ matrix:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ os: [macos-10.15, macos-11.0]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ steps:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ - name: Checkout repository
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ uses: actions/checkout@v2
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ with:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ fetch-depth: 64
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ - name: Cleanup /usr/local
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ run: |
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sudo mkdir /opt/local.old
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sudo mv /usr/local/* /opt/local.old
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ - name: Configure MacPorts Base
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ run: |
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set -eu
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ./configure
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ - name: Build MacPorts Base
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ run: |
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set -eu
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ make
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ - name: Install MacPorts Base
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ run: |
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set -eu
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sudo make install
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ - name: Test MacPorts Base
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ run: |
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set -eu
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ make test
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ - name: Prepare Deployment
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if: github.event_name == 'push' && (github.ref == 'refs/heads/travis-ci' || startsWith(github.ref, 'refs/tags/v'))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ run: |
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set -eu
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sed -i "" "s/-v selfupdate/version/" portmgr/dmg/postflight
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sudo install -d -m755 /opt/local/libexec/macports/postflight
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sudo install -m755 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ portmgr/dmg/postflight \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /opt/local/libexec/macports/postflight/
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sudo install -m644 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ src/*.tcl \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /opt/local/libexec/macports/postflight/
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ tar \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --exclude '/opt/local/var/macports/sip-workaround/?*' \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -cjf "MacPorts.tar.bz2" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /opt/local
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ - name: Deploy to bintray
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if: github.event_name == 'push' && (github.ref == 'refs/heads/travis-ci' || startsWith(github.ref, 'refs/tags/v'))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ run: |
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set -eu
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # printf is a built-in, so this won't show up in ps(1)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ printf \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "machine api.bintray.com\n\tlogin %s\n\tpassword %s\n" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "$user" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "$pass" > ~/.netrc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ chmod 600 ~/.netrc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ os_major=$(uname -r | cut -f 1 -d .)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ macports_version=$(cat config/macports_version)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sha256=$(openssl dgst -sha256 -binary "MacPorts.tar.bz2" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ | xxd -ps -c256)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ curl \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --upload-file "MacPorts.tar.bz2" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --netrc \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --header "X-Checksum-Sha2: ${sha256}" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --header "X-Bintray-Package: MacPorts" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --header "X-Bintray-Version: ${macports_version}" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --header "X-Bintray-Publish: 1" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --header "X-Bintray-Override: 1" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "https://api.bintray.com/content/macports-ci-env/macports-base/MacPorts-${os_major}.tar.bz2"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ env:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ user: "macports-ci-env"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ pass: ${{ secrets.BINTRAY_API_TOKEN }}
</span></pre><pre style='margin:0'>
</pre>