solvespace/.github/workflows/cd.yml

192 lines
5.9 KiB
YAML
Raw Normal View History

CI: Replace Travis with GitHub Actions (#824) Travis's move away from providing unlimited build time to OSS and its inferior developer experience are the reason for this change. The workflows are simple and straightforward, and the build scripts are mostly 1:1 the same we used on Travis. This avoids vendor lock-in as much as possible in case we need to move somewhere else in the future. We introduce two workflows: 1. CD (cd.yml) Runs on: Commits to master, GitHub releases. Does: Run tests, build release assets, update GitHub edge release or release to developer created GitHub release. Builds & uploads snaps to the Snap Store. 2. Test (test.yml) Runs on: Every commit except those on master and v* tagged ones. I.e. PRs and other branches. Does: Run tests only. Creating a release is now an explicit operation. On the Travis workflow, pushing a tag that begins with "v" will lead to the automatic creation of an associated GitHub release. On GHA, creating a GitHub release by hand will trigger the CD-workflow to build & upload the release assets. Other differences to Travis: - Windows builds on Visual Studio 16 2019 instead of Visual Studio 15 2017. - Snap builds run in docker containers, not directly on the build host. - Snap arm64 builds on amd64 via QEMU user emulation. This is slower than what Travis gave us and should be changed when/if GHA offers ARM64 build runners. - GHA retains build artifacts for 90 days by default. Required secrets: - MACOS_CERTIFICATE_PASSWORD - MACOS_CERTIFICATE_P12 - MACOS_APPSTORE_APP_PASSWORD - MACOS_APPSTORE_USERNAME - MACOS_DEVELOPER_ID - SNAPSTORE_LOGIN Discussion: https://github.com/solvespace/solvespace/issues/807 PR: https://github.com/solvespace/solvespace/pull/824 Fixes #807
2020-12-08 17:19:33 +00:00
name: CD
on:
push:
branches:
- master
release:
types:
- created
jobs:
cancel_previous_runs:
runs-on: ubuntu-latest
name: Cancel Previous Runs
steps:
- uses: styfle/cancel-workflow-action@0.8.0
with:
access_token: ${{ github.token }}
CI: Replace Travis with GitHub Actions (#824) Travis's move away from providing unlimited build time to OSS and its inferior developer experience are the reason for this change. The workflows are simple and straightforward, and the build scripts are mostly 1:1 the same we used on Travis. This avoids vendor lock-in as much as possible in case we need to move somewhere else in the future. We introduce two workflows: 1. CD (cd.yml) Runs on: Commits to master, GitHub releases. Does: Run tests, build release assets, update GitHub edge release or release to developer created GitHub release. Builds & uploads snaps to the Snap Store. 2. Test (test.yml) Runs on: Every commit except those on master and v* tagged ones. I.e. PRs and other branches. Does: Run tests only. Creating a release is now an explicit operation. On the Travis workflow, pushing a tag that begins with "v" will lead to the automatic creation of an associated GitHub release. On GHA, creating a GitHub release by hand will trigger the CD-workflow to build & upload the release assets. Other differences to Travis: - Windows builds on Visual Studio 16 2019 instead of Visual Studio 15 2017. - Snap builds run in docker containers, not directly on the build host. - Snap arm64 builds on amd64 via QEMU user emulation. This is slower than what Travis gave us and should be changed when/if GHA offers ARM64 build runners. - GHA retains build artifacts for 90 days by default. Required secrets: - MACOS_CERTIFICATE_PASSWORD - MACOS_CERTIFICATE_P12 - MACOS_APPSTORE_APP_PASSWORD - MACOS_APPSTORE_USERNAME - MACOS_DEVELOPER_ID - SNAPSTORE_LOGIN Discussion: https://github.com/solvespace/solvespace/issues/807 PR: https://github.com/solvespace/solvespace/pull/824 Fixes #807
2020-12-08 17:19:33 +00:00
test_ubuntu:
needs: [cancel_previous_runs]
runs-on: ubuntu-18.04
name: Test Ubuntu
steps:
- uses: actions/checkout@v2
- name: Install Dependencies
run: .github/scripts/install-ubuntu.sh
- name: Build & Test
run: .github/scripts/build-ubuntu.sh
CI: Replace Travis with GitHub Actions (#824) Travis's move away from providing unlimited build time to OSS and its inferior developer experience are the reason for this change. The workflows are simple and straightforward, and the build scripts are mostly 1:1 the same we used on Travis. This avoids vendor lock-in as much as possible in case we need to move somewhere else in the future. We introduce two workflows: 1. CD (cd.yml) Runs on: Commits to master, GitHub releases. Does: Run tests, build release assets, update GitHub edge release or release to developer created GitHub release. Builds & uploads snaps to the Snap Store. 2. Test (test.yml) Runs on: Every commit except those on master and v* tagged ones. I.e. PRs and other branches. Does: Run tests only. Creating a release is now an explicit operation. On the Travis workflow, pushing a tag that begins with "v" will lead to the automatic creation of an associated GitHub release. On GHA, creating a GitHub release by hand will trigger the CD-workflow to build & upload the release assets. Other differences to Travis: - Windows builds on Visual Studio 16 2019 instead of Visual Studio 15 2017. - Snap builds run in docker containers, not directly on the build host. - Snap arm64 builds on amd64 via QEMU user emulation. This is slower than what Travis gave us and should be changed when/if GHA offers ARM64 build runners. - GHA retains build artifacts for 90 days by default. Required secrets: - MACOS_CERTIFICATE_PASSWORD - MACOS_CERTIFICATE_P12 - MACOS_APPSTORE_APP_PASSWORD - MACOS_APPSTORE_USERNAME - MACOS_DEVELOPER_ID - SNAPSTORE_LOGIN Discussion: https://github.com/solvespace/solvespace/issues/807 PR: https://github.com/solvespace/solvespace/pull/824 Fixes #807
2020-12-08 17:19:33 +00:00
test_windows:
needs: [cancel_previous_runs]
CI: Replace Travis with GitHub Actions (#824) Travis's move away from providing unlimited build time to OSS and its inferior developer experience are the reason for this change. The workflows are simple and straightforward, and the build scripts are mostly 1:1 the same we used on Travis. This avoids vendor lock-in as much as possible in case we need to move somewhere else in the future. We introduce two workflows: 1. CD (cd.yml) Runs on: Commits to master, GitHub releases. Does: Run tests, build release assets, update GitHub edge release or release to developer created GitHub release. Builds & uploads snaps to the Snap Store. 2. Test (test.yml) Runs on: Every commit except those on master and v* tagged ones. I.e. PRs and other branches. Does: Run tests only. Creating a release is now an explicit operation. On the Travis workflow, pushing a tag that begins with "v" will lead to the automatic creation of an associated GitHub release. On GHA, creating a GitHub release by hand will trigger the CD-workflow to build & upload the release assets. Other differences to Travis: - Windows builds on Visual Studio 16 2019 instead of Visual Studio 15 2017. - Snap builds run in docker containers, not directly on the build host. - Snap arm64 builds on amd64 via QEMU user emulation. This is slower than what Travis gave us and should be changed when/if GHA offers ARM64 build runners. - GHA retains build artifacts for 90 days by default. Required secrets: - MACOS_CERTIFICATE_PASSWORD - MACOS_CERTIFICATE_P12 - MACOS_APPSTORE_APP_PASSWORD - MACOS_APPSTORE_USERNAME - MACOS_DEVELOPER_ID - SNAPSTORE_LOGIN Discussion: https://github.com/solvespace/solvespace/issues/807 PR: https://github.com/solvespace/solvespace/pull/824 Fixes #807
2020-12-08 17:19:33 +00:00
runs-on: windows-2019
name: Test Windows
steps:
- uses: actions/checkout@v2
- name: Install Dependencies
run: .github/scripts/install-windows.sh
shell: bash
- name: Build & Test
run: .github/scripts/build-windows.sh
shell: bash
test_macos:
needs: [cancel_previous_runs]
2021-02-08 00:07:21 +00:00
runs-on: macos-10.15
CI: Replace Travis with GitHub Actions (#824) Travis's move away from providing unlimited build time to OSS and its inferior developer experience are the reason for this change. The workflows are simple and straightforward, and the build scripts are mostly 1:1 the same we used on Travis. This avoids vendor lock-in as much as possible in case we need to move somewhere else in the future. We introduce two workflows: 1. CD (cd.yml) Runs on: Commits to master, GitHub releases. Does: Run tests, build release assets, update GitHub edge release or release to developer created GitHub release. Builds & uploads snaps to the Snap Store. 2. Test (test.yml) Runs on: Every commit except those on master and v* tagged ones. I.e. PRs and other branches. Does: Run tests only. Creating a release is now an explicit operation. On the Travis workflow, pushing a tag that begins with "v" will lead to the automatic creation of an associated GitHub release. On GHA, creating a GitHub release by hand will trigger the CD-workflow to build & upload the release assets. Other differences to Travis: - Windows builds on Visual Studio 16 2019 instead of Visual Studio 15 2017. - Snap builds run in docker containers, not directly on the build host. - Snap arm64 builds on amd64 via QEMU user emulation. This is slower than what Travis gave us and should be changed when/if GHA offers ARM64 build runners. - GHA retains build artifacts for 90 days by default. Required secrets: - MACOS_CERTIFICATE_PASSWORD - MACOS_CERTIFICATE_P12 - MACOS_APPSTORE_APP_PASSWORD - MACOS_APPSTORE_USERNAME - MACOS_DEVELOPER_ID - SNAPSTORE_LOGIN Discussion: https://github.com/solvespace/solvespace/issues/807 PR: https://github.com/solvespace/solvespace/pull/824 Fixes #807
2020-12-08 17:19:33 +00:00
name: Test macOS
steps:
- uses: actions/checkout@v2
- name: Install Dependencies
2021-02-08 00:07:21 +00:00
run: .github/scripts/install-macos.sh ci
CI: Replace Travis with GitHub Actions (#824) Travis's move away from providing unlimited build time to OSS and its inferior developer experience are the reason for this change. The workflows are simple and straightforward, and the build scripts are mostly 1:1 the same we used on Travis. This avoids vendor lock-in as much as possible in case we need to move somewhere else in the future. We introduce two workflows: 1. CD (cd.yml) Runs on: Commits to master, GitHub releases. Does: Run tests, build release assets, update GitHub edge release or release to developer created GitHub release. Builds & uploads snaps to the Snap Store. 2. Test (test.yml) Runs on: Every commit except those on master and v* tagged ones. I.e. PRs and other branches. Does: Run tests only. Creating a release is now an explicit operation. On the Travis workflow, pushing a tag that begins with "v" will lead to the automatic creation of an associated GitHub release. On GHA, creating a GitHub release by hand will trigger the CD-workflow to build & upload the release assets. Other differences to Travis: - Windows builds on Visual Studio 16 2019 instead of Visual Studio 15 2017. - Snap builds run in docker containers, not directly on the build host. - Snap arm64 builds on amd64 via QEMU user emulation. This is slower than what Travis gave us and should be changed when/if GHA offers ARM64 build runners. - GHA retains build artifacts for 90 days by default. Required secrets: - MACOS_CERTIFICATE_PASSWORD - MACOS_CERTIFICATE_P12 - MACOS_APPSTORE_APP_PASSWORD - MACOS_APPSTORE_USERNAME - MACOS_DEVELOPER_ID - SNAPSTORE_LOGIN Discussion: https://github.com/solvespace/solvespace/issues/807 PR: https://github.com/solvespace/solvespace/pull/824 Fixes #807
2020-12-08 17:19:33 +00:00
- name: Build & Test
2021-02-08 00:07:21 +00:00
run: .github/scripts/build-macos.sh debug arm64 && .github/scripts/build-macos.sh debug x86_64
CI: Replace Travis with GitHub Actions (#824) Travis's move away from providing unlimited build time to OSS and its inferior developer experience are the reason for this change. The workflows are simple and straightforward, and the build scripts are mostly 1:1 the same we used on Travis. This avoids vendor lock-in as much as possible in case we need to move somewhere else in the future. We introduce two workflows: 1. CD (cd.yml) Runs on: Commits to master, GitHub releases. Does: Run tests, build release assets, update GitHub edge release or release to developer created GitHub release. Builds & uploads snaps to the Snap Store. 2. Test (test.yml) Runs on: Every commit except those on master and v* tagged ones. I.e. PRs and other branches. Does: Run tests only. Creating a release is now an explicit operation. On the Travis workflow, pushing a tag that begins with "v" will lead to the automatic creation of an associated GitHub release. On GHA, creating a GitHub release by hand will trigger the CD-workflow to build & upload the release assets. Other differences to Travis: - Windows builds on Visual Studio 16 2019 instead of Visual Studio 15 2017. - Snap builds run in docker containers, not directly on the build host. - Snap arm64 builds on amd64 via QEMU user emulation. This is slower than what Travis gave us and should be changed when/if GHA offers ARM64 build runners. - GHA retains build artifacts for 90 days by default. Required secrets: - MACOS_CERTIFICATE_PASSWORD - MACOS_CERTIFICATE_P12 - MACOS_APPSTORE_APP_PASSWORD - MACOS_APPSTORE_USERNAME - MACOS_DEVELOPER_ID - SNAPSTORE_LOGIN Discussion: https://github.com/solvespace/solvespace/issues/807 PR: https://github.com/solvespace/solvespace/pull/824 Fixes #807
2020-12-08 17:19:33 +00:00
build_release_windows:
needs: [test_ubuntu, test_windows, test_macos]
name: Build Release Windows
runs-on: windows-2019
steps:
- uses: actions/checkout@v2
- name: Install Dependencies
run: .github/scripts/install-windows.sh
shell: bash
- name: Build & Test
run: .github/scripts/build-windows.sh release
shell: bash
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: windows
path: build/bin/RelWithDebInfo/solvespace.exe
CI: Replace Travis with GitHub Actions (#824) Travis's move away from providing unlimited build time to OSS and its inferior developer experience are the reason for this change. The workflows are simple and straightforward, and the build scripts are mostly 1:1 the same we used on Travis. This avoids vendor lock-in as much as possible in case we need to move somewhere else in the future. We introduce two workflows: 1. CD (cd.yml) Runs on: Commits to master, GitHub releases. Does: Run tests, build release assets, update GitHub edge release or release to developer created GitHub release. Builds & uploads snaps to the Snap Store. 2. Test (test.yml) Runs on: Every commit except those on master and v* tagged ones. I.e. PRs and other branches. Does: Run tests only. Creating a release is now an explicit operation. On the Travis workflow, pushing a tag that begins with "v" will lead to the automatic creation of an associated GitHub release. On GHA, creating a GitHub release by hand will trigger the CD-workflow to build & upload the release assets. Other differences to Travis: - Windows builds on Visual Studio 16 2019 instead of Visual Studio 15 2017. - Snap builds run in docker containers, not directly on the build host. - Snap arm64 builds on amd64 via QEMU user emulation. This is slower than what Travis gave us and should be changed when/if GHA offers ARM64 build runners. - GHA retains build artifacts for 90 days by default. Required secrets: - MACOS_CERTIFICATE_PASSWORD - MACOS_CERTIFICATE_P12 - MACOS_APPSTORE_APP_PASSWORD - MACOS_APPSTORE_USERNAME - MACOS_DEVELOPER_ID - SNAPSTORE_LOGIN Discussion: https://github.com/solvespace/solvespace/issues/807 PR: https://github.com/solvespace/solvespace/pull/824 Fixes #807
2020-12-08 17:19:33 +00:00
build_release_windows_openmp:
needs: [test_ubuntu, test_windows, test_macos]
name: Build Release Windows (OpenMP)
runs-on: windows-2019
steps:
- uses: actions/checkout@v2
- name: Install Dependencies
run: .github/scripts/install-windows.sh
shell: bash
- name: Build & Test
run: .github/scripts/build-windows.sh release openmp
shell: bash
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: windows-openmp
path: build/bin/RelWithDebInfo/solvespace-openmp.exe
build_release_macos:
needs: [test_ubuntu, test_windows, test_macos]
name: Build Release macOS
2021-02-08 00:07:21 +00:00
runs-on: macos-10.15
CI: Replace Travis with GitHub Actions (#824) Travis's move away from providing unlimited build time to OSS and its inferior developer experience are the reason for this change. The workflows are simple and straightforward, and the build scripts are mostly 1:1 the same we used on Travis. This avoids vendor lock-in as much as possible in case we need to move somewhere else in the future. We introduce two workflows: 1. CD (cd.yml) Runs on: Commits to master, GitHub releases. Does: Run tests, build release assets, update GitHub edge release or release to developer created GitHub release. Builds & uploads snaps to the Snap Store. 2. Test (test.yml) Runs on: Every commit except those on master and v* tagged ones. I.e. PRs and other branches. Does: Run tests only. Creating a release is now an explicit operation. On the Travis workflow, pushing a tag that begins with "v" will lead to the automatic creation of an associated GitHub release. On GHA, creating a GitHub release by hand will trigger the CD-workflow to build & upload the release assets. Other differences to Travis: - Windows builds on Visual Studio 16 2019 instead of Visual Studio 15 2017. - Snap builds run in docker containers, not directly on the build host. - Snap arm64 builds on amd64 via QEMU user emulation. This is slower than what Travis gave us and should be changed when/if GHA offers ARM64 build runners. - GHA retains build artifacts for 90 days by default. Required secrets: - MACOS_CERTIFICATE_PASSWORD - MACOS_CERTIFICATE_P12 - MACOS_APPSTORE_APP_PASSWORD - MACOS_APPSTORE_USERNAME - MACOS_DEVELOPER_ID - SNAPSTORE_LOGIN Discussion: https://github.com/solvespace/solvespace/issues/807 PR: https://github.com/solvespace/solvespace/pull/824 Fixes #807
2020-12-08 17:19:33 +00:00
steps:
- uses: actions/checkout@v2
- name: Install Dependencies
2021-02-08 00:07:21 +00:00
run: .github/scripts/install-macos.sh ci
CI: Replace Travis with GitHub Actions (#824) Travis's move away from providing unlimited build time to OSS and its inferior developer experience are the reason for this change. The workflows are simple and straightforward, and the build scripts are mostly 1:1 the same we used on Travis. This avoids vendor lock-in as much as possible in case we need to move somewhere else in the future. We introduce two workflows: 1. CD (cd.yml) Runs on: Commits to master, GitHub releases. Does: Run tests, build release assets, update GitHub edge release or release to developer created GitHub release. Builds & uploads snaps to the Snap Store. 2. Test (test.yml) Runs on: Every commit except those on master and v* tagged ones. I.e. PRs and other branches. Does: Run tests only. Creating a release is now an explicit operation. On the Travis workflow, pushing a tag that begins with "v" will lead to the automatic creation of an associated GitHub release. On GHA, creating a GitHub release by hand will trigger the CD-workflow to build & upload the release assets. Other differences to Travis: - Windows builds on Visual Studio 16 2019 instead of Visual Studio 15 2017. - Snap builds run in docker containers, not directly on the build host. - Snap arm64 builds on amd64 via QEMU user emulation. This is slower than what Travis gave us and should be changed when/if GHA offers ARM64 build runners. - GHA retains build artifacts for 90 days by default. Required secrets: - MACOS_CERTIFICATE_PASSWORD - MACOS_CERTIFICATE_P12 - MACOS_APPSTORE_APP_PASSWORD - MACOS_APPSTORE_USERNAME - MACOS_DEVELOPER_ID - SNAPSTORE_LOGIN Discussion: https://github.com/solvespace/solvespace/issues/807 PR: https://github.com/solvespace/solvespace/pull/824 Fixes #807
2020-12-08 17:19:33 +00:00
- name: Build & Test
2021-02-08 00:07:21 +00:00
run: .github/scripts/build-macos.sh release arm64 && .github/scripts/build-macos.sh release x86_64
CI: Replace Travis with GitHub Actions (#824) Travis's move away from providing unlimited build time to OSS and its inferior developer experience are the reason for this change. The workflows are simple and straightforward, and the build scripts are mostly 1:1 the same we used on Travis. This avoids vendor lock-in as much as possible in case we need to move somewhere else in the future. We introduce two workflows: 1. CD (cd.yml) Runs on: Commits to master, GitHub releases. Does: Run tests, build release assets, update GitHub edge release or release to developer created GitHub release. Builds & uploads snaps to the Snap Store. 2. Test (test.yml) Runs on: Every commit except those on master and v* tagged ones. I.e. PRs and other branches. Does: Run tests only. Creating a release is now an explicit operation. On the Travis workflow, pushing a tag that begins with "v" will lead to the automatic creation of an associated GitHub release. On GHA, creating a GitHub release by hand will trigger the CD-workflow to build & upload the release assets. Other differences to Travis: - Windows builds on Visual Studio 16 2019 instead of Visual Studio 15 2017. - Snap builds run in docker containers, not directly on the build host. - Snap arm64 builds on amd64 via QEMU user emulation. This is slower than what Travis gave us and should be changed when/if GHA offers ARM64 build runners. - GHA retains build artifacts for 90 days by default. Required secrets: - MACOS_CERTIFICATE_PASSWORD - MACOS_CERTIFICATE_P12 - MACOS_APPSTORE_APP_PASSWORD - MACOS_APPSTORE_USERNAME - MACOS_DEVELOPER_ID - SNAPSTORE_LOGIN Discussion: https://github.com/solvespace/solvespace/issues/807 PR: https://github.com/solvespace/solvespace/pull/824 Fixes #807
2020-12-08 17:19:33 +00:00
- name: Sign Build
run: .github/scripts/sign-macos.sh
env:
MACOS_CERTIFICATE_PASSWORD: ${{ secrets.MACOS_CERTIFICATE_PASSWORD }}
MACOS_CERTIFICATE_P12: ${{ secrets.MACOS_CERTIFICATE_P12 }}
MACOS_APPSTORE_APP_PASSWORD: ${{ secrets.MACOS_APPSTORE_APP_PASSWORD }}
MACOS_APPSTORE_USERNAME: ${{ secrets.MACOS_APPSTORE_USERNAME }}
MACOS_DEVELOPER_ID: ${{ secrets.MACOS_DEVELOPER_ID }}
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: macos
path: build/bin/SolveSpace.dmg
2021-02-08 00:07:21 +00:00
CI: Replace Travis with GitHub Actions (#824) Travis's move away from providing unlimited build time to OSS and its inferior developer experience are the reason for this change. The workflows are simple and straightforward, and the build scripts are mostly 1:1 the same we used on Travis. This avoids vendor lock-in as much as possible in case we need to move somewhere else in the future. We introduce two workflows: 1. CD (cd.yml) Runs on: Commits to master, GitHub releases. Does: Run tests, build release assets, update GitHub edge release or release to developer created GitHub release. Builds & uploads snaps to the Snap Store. 2. Test (test.yml) Runs on: Every commit except those on master and v* tagged ones. I.e. PRs and other branches. Does: Run tests only. Creating a release is now an explicit operation. On the Travis workflow, pushing a tag that begins with "v" will lead to the automatic creation of an associated GitHub release. On GHA, creating a GitHub release by hand will trigger the CD-workflow to build & upload the release assets. Other differences to Travis: - Windows builds on Visual Studio 16 2019 instead of Visual Studio 15 2017. - Snap builds run in docker containers, not directly on the build host. - Snap arm64 builds on amd64 via QEMU user emulation. This is slower than what Travis gave us and should be changed when/if GHA offers ARM64 build runners. - GHA retains build artifacts for 90 days by default. Required secrets: - MACOS_CERTIFICATE_PASSWORD - MACOS_CERTIFICATE_P12 - MACOS_APPSTORE_APP_PASSWORD - MACOS_APPSTORE_USERNAME - MACOS_DEVELOPER_ID - SNAPSTORE_LOGIN Discussion: https://github.com/solvespace/solvespace/issues/807 PR: https://github.com/solvespace/solvespace/pull/824 Fixes #807
2020-12-08 17:19:33 +00:00
deploy_snap_amd64:
needs: [test_ubuntu, test_windows, test_macos]
name: Deploy AMD64 Snap
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Fetch Tags
run: git fetch --force --tags
CI: Replace Travis with GitHub Actions (#824) Travis's move away from providing unlimited build time to OSS and its inferior developer experience are the reason for this change. The workflows are simple and straightforward, and the build scripts are mostly 1:1 the same we used on Travis. This avoids vendor lock-in as much as possible in case we need to move somewhere else in the future. We introduce two workflows: 1. CD (cd.yml) Runs on: Commits to master, GitHub releases. Does: Run tests, build release assets, update GitHub edge release or release to developer created GitHub release. Builds & uploads snaps to the Snap Store. 2. Test (test.yml) Runs on: Every commit except those on master and v* tagged ones. I.e. PRs and other branches. Does: Run tests only. Creating a release is now an explicit operation. On the Travis workflow, pushing a tag that begins with "v" will lead to the automatic creation of an associated GitHub release. On GHA, creating a GitHub release by hand will trigger the CD-workflow to build & upload the release assets. Other differences to Travis: - Windows builds on Visual Studio 16 2019 instead of Visual Studio 15 2017. - Snap builds run in docker containers, not directly on the build host. - Snap arm64 builds on amd64 via QEMU user emulation. This is slower than what Travis gave us and should be changed when/if GHA offers ARM64 build runners. - GHA retains build artifacts for 90 days by default. Required secrets: - MACOS_CERTIFICATE_PASSWORD - MACOS_CERTIFICATE_P12 - MACOS_APPSTORE_APP_PASSWORD - MACOS_APPSTORE_USERNAME - MACOS_DEVELOPER_ID - SNAPSTORE_LOGIN Discussion: https://github.com/solvespace/solvespace/issues/807 PR: https://github.com/solvespace/solvespace/pull/824 Fixes #807
2020-12-08 17:19:33 +00:00
- name: Set Up Source
run: rsync --filter=":- .gitignore" -r ./ pkg/snap/solvespace-snap-src
- name: Build Snap
uses: snapcore/action-build@v1
CI: Replace Travis with GitHub Actions (#824) Travis's move away from providing unlimited build time to OSS and its inferior developer experience are the reason for this change. The workflows are simple and straightforward, and the build scripts are mostly 1:1 the same we used on Travis. This avoids vendor lock-in as much as possible in case we need to move somewhere else in the future. We introduce two workflows: 1. CD (cd.yml) Runs on: Commits to master, GitHub releases. Does: Run tests, build release assets, update GitHub edge release or release to developer created GitHub release. Builds & uploads snaps to the Snap Store. 2. Test (test.yml) Runs on: Every commit except those on master and v* tagged ones. I.e. PRs and other branches. Does: Run tests only. Creating a release is now an explicit operation. On the Travis workflow, pushing a tag that begins with "v" will lead to the automatic creation of an associated GitHub release. On GHA, creating a GitHub release by hand will trigger the CD-workflow to build & upload the release assets. Other differences to Travis: - Windows builds on Visual Studio 16 2019 instead of Visual Studio 15 2017. - Snap builds run in docker containers, not directly on the build host. - Snap arm64 builds on amd64 via QEMU user emulation. This is slower than what Travis gave us and should be changed when/if GHA offers ARM64 build runners. - GHA retains build artifacts for 90 days by default. Required secrets: - MACOS_CERTIFICATE_PASSWORD - MACOS_CERTIFICATE_P12 - MACOS_APPSTORE_APP_PASSWORD - MACOS_APPSTORE_USERNAME - MACOS_DEVELOPER_ID - SNAPSTORE_LOGIN Discussion: https://github.com/solvespace/solvespace/issues/807 PR: https://github.com/solvespace/solvespace/pull/824 Fixes #807
2020-12-08 17:19:33 +00:00
id: build
with:
path: pkg/snap
- name: Upload & Release to Edge
if: github.event_name == 'push'
uses: snapcore/action-publish@v1
2023-01-07 23:33:15 +00:00
env:
2023-01-31 22:45:42 +00:00
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPSTORE_LOGIN }}
CI: Replace Travis with GitHub Actions (#824) Travis's move away from providing unlimited build time to OSS and its inferior developer experience are the reason for this change. The workflows are simple and straightforward, and the build scripts are mostly 1:1 the same we used on Travis. This avoids vendor lock-in as much as possible in case we need to move somewhere else in the future. We introduce two workflows: 1. CD (cd.yml) Runs on: Commits to master, GitHub releases. Does: Run tests, build release assets, update GitHub edge release or release to developer created GitHub release. Builds & uploads snaps to the Snap Store. 2. Test (test.yml) Runs on: Every commit except those on master and v* tagged ones. I.e. PRs and other branches. Does: Run tests only. Creating a release is now an explicit operation. On the Travis workflow, pushing a tag that begins with "v" will lead to the automatic creation of an associated GitHub release. On GHA, creating a GitHub release by hand will trigger the CD-workflow to build & upload the release assets. Other differences to Travis: - Windows builds on Visual Studio 16 2019 instead of Visual Studio 15 2017. - Snap builds run in docker containers, not directly on the build host. - Snap arm64 builds on amd64 via QEMU user emulation. This is slower than what Travis gave us and should be changed when/if GHA offers ARM64 build runners. - GHA retains build artifacts for 90 days by default. Required secrets: - MACOS_CERTIFICATE_PASSWORD - MACOS_CERTIFICATE_P12 - MACOS_APPSTORE_APP_PASSWORD - MACOS_APPSTORE_USERNAME - MACOS_DEVELOPER_ID - SNAPSTORE_LOGIN Discussion: https://github.com/solvespace/solvespace/issues/807 PR: https://github.com/solvespace/solvespace/pull/824 Fixes #807
2020-12-08 17:19:33 +00:00
with:
snap: ${{ steps.build.outputs.snap }}
release: edge
- name: Upload & Release to Beta + Edge
if: github.event_name == 'release'
uses: snapcore/action-publish@v1
with:
store_login: ${{ secrets.SNAPSTORE_LOGIN }}
snap: ${{ steps.build.outputs.snap }}
release: edge,beta
2021-02-08 00:07:21 +00:00
CI: Replace Travis with GitHub Actions (#824) Travis's move away from providing unlimited build time to OSS and its inferior developer experience are the reason for this change. The workflows are simple and straightforward, and the build scripts are mostly 1:1 the same we used on Travis. This avoids vendor lock-in as much as possible in case we need to move somewhere else in the future. We introduce two workflows: 1. CD (cd.yml) Runs on: Commits to master, GitHub releases. Does: Run tests, build release assets, update GitHub edge release or release to developer created GitHub release. Builds & uploads snaps to the Snap Store. 2. Test (test.yml) Runs on: Every commit except those on master and v* tagged ones. I.e. PRs and other branches. Does: Run tests only. Creating a release is now an explicit operation. On the Travis workflow, pushing a tag that begins with "v" will lead to the automatic creation of an associated GitHub release. On GHA, creating a GitHub release by hand will trigger the CD-workflow to build & upload the release assets. Other differences to Travis: - Windows builds on Visual Studio 16 2019 instead of Visual Studio 15 2017. - Snap builds run in docker containers, not directly on the build host. - Snap arm64 builds on amd64 via QEMU user emulation. This is slower than what Travis gave us and should be changed when/if GHA offers ARM64 build runners. - GHA retains build artifacts for 90 days by default. Required secrets: - MACOS_CERTIFICATE_PASSWORD - MACOS_CERTIFICATE_P12 - MACOS_APPSTORE_APP_PASSWORD - MACOS_APPSTORE_USERNAME - MACOS_DEVELOPER_ID - SNAPSTORE_LOGIN Discussion: https://github.com/solvespace/solvespace/issues/807 PR: https://github.com/solvespace/solvespace/pull/824 Fixes #807
2020-12-08 17:19:33 +00:00
upload_release_assets:
name: Upload Release Assets
needs: [build_release_windows, build_release_windows_openmp, build_release_macos]
if: "!cancelled() && github.event_name == 'release'"
CI: Replace Travis with GitHub Actions (#824) Travis's move away from providing unlimited build time to OSS and its inferior developer experience are the reason for this change. The workflows are simple and straightforward, and the build scripts are mostly 1:1 the same we used on Travis. This avoids vendor lock-in as much as possible in case we need to move somewhere else in the future. We introduce two workflows: 1. CD (cd.yml) Runs on: Commits to master, GitHub releases. Does: Run tests, build release assets, update GitHub edge release or release to developer created GitHub release. Builds & uploads snaps to the Snap Store. 2. Test (test.yml) Runs on: Every commit except those on master and v* tagged ones. I.e. PRs and other branches. Does: Run tests only. Creating a release is now an explicit operation. On the Travis workflow, pushing a tag that begins with "v" will lead to the automatic creation of an associated GitHub release. On GHA, creating a GitHub release by hand will trigger the CD-workflow to build & upload the release assets. Other differences to Travis: - Windows builds on Visual Studio 16 2019 instead of Visual Studio 15 2017. - Snap builds run in docker containers, not directly on the build host. - Snap arm64 builds on amd64 via QEMU user emulation. This is slower than what Travis gave us and should be changed when/if GHA offers ARM64 build runners. - GHA retains build artifacts for 90 days by default. Required secrets: - MACOS_CERTIFICATE_PASSWORD - MACOS_CERTIFICATE_P12 - MACOS_APPSTORE_APP_PASSWORD - MACOS_APPSTORE_USERNAME - MACOS_DEVELOPER_ID - SNAPSTORE_LOGIN Discussion: https://github.com/solvespace/solvespace/issues/807 PR: https://github.com/solvespace/solvespace/pull/824 Fixes #807
2020-12-08 17:19:33 +00:00
runs-on: ubuntu-latest
steps:
- name: Download All Workflow Artifacts
uses: actions/download-artifact@v2
- name: Get Release Upload URL
id: get_upload_url
env:
event: ${{ toJson(github.event) }}
run: |
upload_url=$(echo "$event" | jq -r ".release.upload_url")
CI: Replace Travis with GitHub Actions (#824) Travis's move away from providing unlimited build time to OSS and its inferior developer experience are the reason for this change. The workflows are simple and straightforward, and the build scripts are mostly 1:1 the same we used on Travis. This avoids vendor lock-in as much as possible in case we need to move somewhere else in the future. We introduce two workflows: 1. CD (cd.yml) Runs on: Commits to master, GitHub releases. Does: Run tests, build release assets, update GitHub edge release or release to developer created GitHub release. Builds & uploads snaps to the Snap Store. 2. Test (test.yml) Runs on: Every commit except those on master and v* tagged ones. I.e. PRs and other branches. Does: Run tests only. Creating a release is now an explicit operation. On the Travis workflow, pushing a tag that begins with "v" will lead to the automatic creation of an associated GitHub release. On GHA, creating a GitHub release by hand will trigger the CD-workflow to build & upload the release assets. Other differences to Travis: - Windows builds on Visual Studio 16 2019 instead of Visual Studio 15 2017. - Snap builds run in docker containers, not directly on the build host. - Snap arm64 builds on amd64 via QEMU user emulation. This is slower than what Travis gave us and should be changed when/if GHA offers ARM64 build runners. - GHA retains build artifacts for 90 days by default. Required secrets: - MACOS_CERTIFICATE_PASSWORD - MACOS_CERTIFICATE_P12 - MACOS_APPSTORE_APP_PASSWORD - MACOS_APPSTORE_USERNAME - MACOS_DEVELOPER_ID - SNAPSTORE_LOGIN Discussion: https://github.com/solvespace/solvespace/issues/807 PR: https://github.com/solvespace/solvespace/pull/824 Fixes #807
2020-12-08 17:19:33 +00:00
echo "::set-output name=upload_url::$upload_url"
echo "Upload URL: $upload_url"
- name: Upload solvespace.exe
uses: actions/upload-release-asset@v1
continue-on-error: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.get_upload_url.outputs.upload_url }}
asset_path: windows/solvespace.exe
asset_name: solvespace.exe
asset_content_type: binary/octet-stream
- name: Upload solvespace-openmp.exe
uses: actions/upload-release-asset@v1
continue-on-error: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.get_upload_url.outputs.upload_url }}
asset_path: windows-openmp/solvespace-openmp.exe
asset_name: solvespace-openmp.exe
asset_content_type: binary/octet-stream
- name: Upload SolveSpace.dmg
uses: actions/upload-release-asset@v1
continue-on-error: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.get_upload_url.outputs.upload_url }}
asset_path: macos/SolveSpace.dmg
asset_name: SolveSpace.dmg
asset_content_type: binary/octet-stream