From fafe39b9eeabd5e354aa60c2abbb1ab216454350 Mon Sep 17 00:00:00 2001 From: Matthew LeVan Date: Sat, 4 Mar 2023 10:41:55 -0600 Subject: [PATCH 1/2] ci: use branch for `vere` version --- .github/workflows/develop.yml | 34 ++++++++++++++++++++ .github/workflows/{build.yml => feature.yml} | 26 ++++----------- .github/workflows/master.yml | 34 ++++++++++++++++++++ .github/workflows/release.yml | 34 ++++++++++++++++++++ .github/workflows/vere.yml | 11 +++---- 5 files changed, 112 insertions(+), 27 deletions(-) create mode 100644 .github/workflows/develop.yml rename .github/workflows/{build.yml => feature.yml} (52%) create mode 100644 .github/workflows/master.yml create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/develop.yml b/.github/workflows/develop.yml new file mode 100644 index 000000000..4832a4d7d --- /dev/null +++ b/.github/workflows/develop.yml @@ -0,0 +1,34 @@ +name: Push to develop + +on: + push: + branches: + - 'develop' + paths: + - '.github/workflows/feature.yml' + - '.github/workflows/develop.yml' + - '.github/workflows/release.yml' + - '.github/workflows/master.yml' + - '.github/workflows/vere.yml' + - 'pkg/arvo/**' + - 'pkg/docker-image/**' + - 'pkg/ent/**' + - 'pkg/ge-additions/**' + - 'pkg/libaes_siv/**' + - 'pkg/urbit/**' + - 'pkg/urcrypt/**' + - 'tests/**' + - 'bin/**' + - 'nix/**' + - 'default.nix' + +jobs: + call-vere: + uses: ./.github/workflows/vere.yml + with: + pace: 'edge' + upload: >- + ${{ + (github.ref_name == 'next/vere' && github.ref_type == 'branch') + }} + secrets: inherit diff --git a/.github/workflows/build.yml b/.github/workflows/feature.yml similarity index 52% rename from .github/workflows/build.yml rename to .github/workflows/feature.yml index 400845174..01ca5af92 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/feature.yml @@ -1,25 +1,12 @@ -name: build +name: Feature pull request on: - push: - paths: - - '.github/workflows/build.yml' - - '.github/workflows/vere.yml' - - 'pkg/arvo/**' - - 'pkg/docker-image/**' - - 'pkg/ent/**' - - 'pkg/ge-additions/**' - - 'pkg/libaes_siv/**' - - 'pkg/urbit/**' - - 'pkg/urcrypt/**' - - 'tests/**' - - 'bin/**' - - 'nix/**' - - 'default.nix' - - 'vere-version' pull_request: paths: - - '.github/workflows/build.yml' + - '.github/workflows/feature.yml' + - '.github/workflows/develop.yml' + - '.github/workflows/release.yml' + - '.github/workflows/master.yml' - '.github/workflows/vere.yml' - 'pkg/arvo/**' - 'pkg/docker-image/**' @@ -32,13 +19,12 @@ on: - 'bin/**' - 'nix/**' - 'default.nix' - - 'vere-version' jobs: call-vere: uses: ./.github/workflows/vere.yml with: - pace: 'edge' # XX s/b once? + pace: 'edge' upload: >- ${{ (github.ref_name == 'next/vere' && github.ref_type == 'branch') diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml new file mode 100644 index 000000000..8a9fb7638 --- /dev/null +++ b/.github/workflows/master.yml @@ -0,0 +1,34 @@ +name: Push to master + +on: + push: + branches: + - 'master' + paths: + - '.github/workflows/feature.yml' + - '.github/workflows/develop.yml' + - '.github/workflows/release.yml' + - '.github/workflows/master.yml' + - '.github/workflows/vere.yml' + - 'pkg/arvo/**' + - 'pkg/docker-image/**' + - 'pkg/ent/**' + - 'pkg/ge-additions/**' + - 'pkg/libaes_siv/**' + - 'pkg/urbit/**' + - 'pkg/urcrypt/**' + - 'tests/**' + - 'bin/**' + - 'nix/**' + - 'default.nix' + +jobs: + call-vere: + uses: ./.github/workflows/vere.yml + with: + pace: 'edge' + upload: >- + ${{ + (github.ref_name == 'next/vere' && github.ref_type == 'branch') + }} + secrets: inherit diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 000000000..58f74e6c7 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,34 @@ +name: Push to release branch + +on: + push: + branches: + - 'next/*' + paths: + - '.github/workflows/feature.yml' + - '.github/workflows/develop.yml' + - '.github/workflows/release.yml' + - '.github/workflows/master.yml' + - '.github/workflows/vere.yml' + - 'pkg/arvo/**' + - 'pkg/docker-image/**' + - 'pkg/ent/**' + - 'pkg/ge-additions/**' + - 'pkg/libaes_siv/**' + - 'pkg/urbit/**' + - 'pkg/urcrypt/**' + - 'tests/**' + - 'bin/**' + - 'nix/**' + - 'default.nix' + +jobs: + call-vere: + uses: ./.github/workflows/vere.yml + with: + pace: 'soon' + upload: >- + ${{ + (github.ref_name == 'next/vere' && github.ref_type == 'branch') + }} + secrets: inherit diff --git a/.github/workflows/vere.yml b/.github/workflows/vere.yml index 9f9c5cd11..c24155c18 100644 --- a/.github/workflows/vere.yml +++ b/.github/workflows/vere.yml @@ -39,11 +39,6 @@ on: - soon - live -env: - UPLOAD_BASE: bootstrap.urbit.org/vere - VERE_PACE: ${{ inputs.pace }} - VERSION_TYPE: ${{ (inputs.pace == 'soon' || inputs.pace == 'live') && 'real' || 'hash' }} - jobs: urbit: strategy: @@ -78,8 +73,10 @@ jobs: name: run urbit-tests run: | cp -RL tests pkg/arvo/tests - vere="$(cat ./vere-version | sed -e 's/\([^ ]*\) \([^ ]*\)/\1\/\2\/vere-\2/g' | tr -d '\n')" - url="$(echo https://bootstrap.urbit.org/vere/${vere}-linux-x86_64)" + vere=$(curl https://bootstrap.urbit.org/vere/${{ inputs.pace }}/last) + echo $vere + url="$(echo https://bootstrap.urbit.org/vere/${{ inputs.pace }}/v${vere}/vere-v${vere}-linux-x86_64)" + echo $url # put in .jam so it doesn't crash when it gets -A'd in curl -Lo pkg/arvo/vere.jam "$url" chmod +x pkg/arvo/vere.jam From e34959e6cd4a786ad80cc3ed75a5b267879de2d7 Mon Sep 17 00:00:00 2001 From: Matthew LeVan Date: Mon, 6 Mar 2023 09:24:38 -0600 Subject: [PATCH 2/2] ci: small fixes --- .github/workflows/master.yml | 2 +- .github/workflows/release.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index 8a9fb7638..b04cd042e 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -26,7 +26,7 @@ jobs: call-vere: uses: ./.github/workflows/vere.yml with: - pace: 'edge' + pace: 'live' upload: >- ${{ (github.ref_name == 'next/vere' && github.ref_type == 'branch') diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 58f74e6c7..1d2258a1f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,7 +3,7 @@ name: Push to release branch on: push: branches: - - 'next/*' + - 'release/*' paths: - '.github/workflows/feature.yml' - '.github/workflows/develop.yml'