<pre style='margin:0'>
Clemens Lang (neverpanic) pushed a commit to branch travis-ci
in repository macports-base.
</pre>
<p><a href="https://github.com/macports/macports-base/commit/adabd58d8b33ef6426f18b4777b36014cd76664e">https://github.com/macports/macports-base/commit/adabd58d8b33ef6426f18b4777b36014cd76664e</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit adabd58d8b33ef6426f18b4777b36014cd76664e
</span>Author: Clemens Lang <cal@macports.org>
AuthorDate: Tue Dec 8 21:56:56 2020 +0100
<span style='display:block; white-space:pre;color:#404040;'> ci: Add github workflow to publish build env
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Travis is less and less reliable and will probably be disabled soon
</span><span style='display:block; white-space:pre;color:#404040;'> anyway. Switch building of our CI envs to GitHub Actions and enable
</span><span style='display:block; white-space:pre;color:#404040;'> building them on tag push, so that the manual merge process into
</span><span style='display:block; white-space:pre;color:#404040;'> travis-ci goes away.
</span>---
.github/workflows/prepare-ci-env.yml | 74 ++++++++++++++++++++++++++++++++++++
1 file changed, 74 insertions(+)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/.github/workflows/prepare-ci-env.yml b/.github/workflows/prepare-ci-env.yml
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000..9ddc6a42
</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/prepare-ci-env.yml
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,74 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+---
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+name: "Prepare macports-ports CI environment"
</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;'>+ branches:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ - travis-ci
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ tags:
</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;'>+jobs:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ build:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ name: "Prepare macports-ports CI environment"
</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: 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;'>+ ./configure
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ make
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sudo make install
</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;'>+ 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/" postmgr/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;'>+ postmgr/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 cjf "MacPorts.tar.bz2" /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;'>+ 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>