Skip to content

Commit

Permalink
fix CI to re-release
Browse files Browse the repository at this point in the history
  • Loading branch information
kp2pml30 committed Oct 9, 2024
1 parent 09f0950 commit 1abae77
Show file tree
Hide file tree
Showing 3 changed files with 79 additions and 30 deletions.
19 changes: 5 additions & 14 deletions .github/workflows/genvm-all.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,17 @@ on:
- doc/**
- shell.nix
- '*.md'
branches:
- '*'
tags-ignore:
- v*
defaults:
run:
shell: bash -x {0}

jobs:
pre-job:
runs-on: ubuntu-latest
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/[email protected]
with:
skip_after_successful_duplicate: 'true'

pre-commit:
runs-on: ubuntu-latest
needs: [pre-job]
if: ${{ needs.pre-job.outputs.should_skip != 'true' }}
steps:
- uses: actions/checkout@v4
- name: Get source
Expand All @@ -43,8 +35,7 @@ jobs:
### MODULE TESTS

module-test-cargo:
needs: [pre-job]
if: ${{ needs.pre-job.outputs.should_skip != 'true' }}
needs: [pre-commit]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down
86 changes: 71 additions & 15 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,39 +11,95 @@ defaults:
shell: bash -x {0}

jobs:
build-and-release:
release-build-runners:
runs-on: ubuntu-latest
permissions:
contents: write # Needed for creating releases
outputs:
url: ${{ steps.artifact-upload-step.outputs.artifact-url }}
steps:
- uses: actions/checkout@v4

- name: Get source
uses: ./.github/actions/get-src
with:
install_also: --genvm --rust --wasi

- name: Install tools and configure
install_also: --wasi --rust
third_party: sdk-rust/third-party/wasi-rs runners/softfloat/berkeley-softfloat-3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Cache Docker layers
uses: actions/cache@v4
with:
save-always: true
path: /tmp/.buildx-cache
key: runners-buildx-${{ github.sha }}
restore-keys: |
runners-buildx-
- name: Configure
run: |
cd "$GITHUB_WORKSPACE" && \
source env.sh && \
./tools/ya-build/ya-build config --preload .ci/release-conf.rb
- name: Build package
ya-build config
- name: Build extension
run: |
cd "$GITHUB_WORKSPACE" && \
source env.sh && \
ninja -v -C build tags/all && \
ninja --verbose -C build genvm/runners/cpython/extension && \
git diff -U1 --exit-code
- name: Build
run: |
source env.sh && \
ninja --verbose -C build tags/runner && \
tree build/out && \
pushd build/out && \
zip -r -9 ../package.zip * && \
zip -r -9 ../runners.zip * && \
popd
- name: Publish runners
id: artifact-upload-step
uses: actions/upload-artifact@v4
with:
name: genvm-runners
path: ${{ github.workspace }}/build/runners.zip

release-build-genvm-release-ubuntu-latest:
uses: ./.github/workflows/genvm-build-template.yaml
with:
build_type: release
runs_on: ubuntu-latest

release-build-genvm-release-macos-latest:
uses: ./.github/workflows/genvm-build-template.yaml
with:
build_type: release
runs_on: macos-latest

release-publish:
needs: [release-build-runners, release-build-genvm-release-ubuntu-latest, release-build-genvm-release-macos-latest]
runs-on: ubuntu-latest
permissions:
contents: write # Needed for creating releases
steps:
- uses: actions/download-artifact@v4
with:
name: genvm-runners

- run: mv runners.zip genvm-runners.zip

- uses: actions/download-artifact@v4
with:
name: genvm-release-ubuntu-latest

- run: mv genvm.zip genvm-linux-amd64.zip

- uses: actions/download-artifact@v4
with:
name: genvm-release-macos-latest

- run: mv genvm.zip genvm-macos-arm64.zip

- name: Create Release
id: create_release
uses: softprops/action-gh-release@v2
with:
files: build/package.zip
files: |
genvm-runners.zip
genvm-linux-amd64.zip
genvm-macos-arm64.zip
name: Release ${{ github.ref_name }}
draft: false
prerelease: false
Expand Down
4 changes: 3 additions & 1 deletion renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,7 @@
"enabled": true
},
"osvVulnerabilityAlerts": true,
"dependencyDashboard": true
"dependencyDashboard": true,
"rebaseWhen": "never",
"automerge": false
}

0 comments on commit 1abae77

Please sign in to comment.