Skip to content

Commit bb049ee

Browse files
ci: add nightly releases
Signed-off-by: Vytautas Astrauskas <vytautas.astrauskas@sensmetry.com>
1 parent 481cdfd commit bb049ee

2 files changed

Lines changed: 156 additions & 44 deletions

File tree

.github/workflows/python.yml

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -257,29 +257,29 @@ jobs:
257257
name: wheels-sdist
258258
path: dist
259259

260-
release:
261-
name: Release
262-
runs-on: ubuntu-latest
263-
if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
264-
needs: [linux, musllinux, windows, macos, sdist]
265-
permissions:
266-
# Use to sign the release artifacts
267-
id-token: write
268-
# Used to upload release artifacts
269-
contents: write
270-
# Used to generate artifact attestation
271-
attestations: write
272-
steps:
273-
- uses: actions/download-artifact@v4
274-
- name: Generate artifact attestation
275-
uses: actions/attest-build-provenance@v2
276-
with:
277-
subject-path: 'wheels-*/*'
278-
- name: Publish to PyPI
279-
if: ${{ startsWith(github.ref, 'refs/tags/') }}
280-
uses: PyO3/maturin-action@v1
281-
env:
282-
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
283-
with:
284-
command: upload
285-
args: --non-interactive --skip-existing wheels-*/*
260+
# release:
261+
# name: Release
262+
# runs-on: ubuntu-latest
263+
# if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
264+
# needs: [linux, musllinux, windows, macos, sdist]
265+
# permissions:
266+
# # Use to sign the release artifacts
267+
# id-token: write
268+
# # Used to upload release artifacts
269+
# contents: write
270+
# # Used to generate artifact attestation
271+
# attestations: write
272+
# steps:
273+
# - uses: actions/download-artifact@v4
274+
# - name: Generate artifact attestation
275+
# uses: actions/attest-build-provenance@v2
276+
# with:
277+
# subject-path: 'wheels-*/*'
278+
# - name: Publish to PyPI
279+
# if: ${{ startsWith(github.ref, 'refs/tags/') }}
280+
# uses: PyO3/maturin-action@v1
281+
# env:
282+
# MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
283+
# with:
284+
# command: upload
285+
# args: --non-interactive --skip-existing wheels-*/*

.github/workflows/test.yml

Lines changed: 130 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,44 @@ env:
1414
RUST_BACKTRACE: 1
1515

1616
jobs:
17-
test:
17+
# test:
18+
# strategy:
19+
# matrix:
20+
# # macos-13 is x86, macos-latest is arm64
21+
# os: [ubuntu-22.04, windows-latest, macos-13, macos-latest]
22+
# fail-fast: false
23+
# runs-on: ${{ matrix.os }}
24+
# steps:
25+
# - uses: actions/checkout@v4
26+
# - name: Cache
27+
# uses: actions/cache@v4
28+
# with:
29+
# path: |
30+
# ~/.cargo/registry
31+
# ~/.cargo/git
32+
# target
33+
# key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
34+
# - uses: taiki-e/install-action@cargo-hack
35+
# - name: Clippy
36+
# run: cargo hack clippy --each-feature --no-dev-deps --features std --ignore-unknown-features -- --deny warnings
37+
# - name: Format
38+
# run: cargo fmt --check
39+
# - name: Set up git user
40+
# run: |
41+
# git config --global user.email "user@sysand.org"
42+
# git config --global user.name "Test User"
43+
# - name: Test Core
44+
# run: cargo test --package sysand-core --verbose --features filesystem,js,python,alltests
45+
# - name: Test CLI
46+
# run: cargo test --package sysand --verbose --features alltests
1847

48+
build:
1949
strategy:
2050
matrix:
2151
# macos-13 is x86, macos-latest is arm64
22-
os: [ubuntu-22.04, windows-latest, macos-13, macos-latest]
23-
fail-fast: false
24-
52+
os: [ubuntu-22.04, ubuntu-24.04-arm, windows-latest, windows-11-arm, macos-13, macos-latest]
2553
runs-on: ${{ matrix.os }}
26-
54+
# needs: [test]
2755
steps:
2856
- uses: actions/checkout@v4
2957
- name: Cache
@@ -34,16 +62,100 @@ jobs:
3462
~/.cargo/git
3563
target
3664
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
37-
- uses: taiki-e/install-action@cargo-hack
38-
- name: Clippy
39-
run: cargo hack clippy --each-feature --no-dev-deps --features std --ignore-unknown-features -- --deny warnings
40-
- name: Format
41-
run: cargo fmt --check
42-
- name: Set up git user
43-
run: |
44-
git config --global user.email "user@sysand.org"
45-
git config --global user.name "Test User"
46-
- name: Test Core
47-
run: cargo test --package sysand-core --verbose --features filesystem,js,python,alltests
48-
- name: Test CLI
49-
run: cargo test --package sysand --verbose --features alltests
65+
- name: Build
66+
run: cargo build --bin sysand --release
67+
- name: Create the distribution directory
68+
run: mkdir -p dist
69+
- name: Copy binaries
70+
if: matrix.os == 'windows-latest' || matrix.os == 'windows-11-arm'
71+
run: cp target/release/sysand.exe dist/sysand-${{ matrix.os }}.exe
72+
- name: Copy binaries
73+
if: matrix.os != 'windows-latest' && matrix.os != 'windows-11-arm'
74+
run: cp target/release/sysand dist/sysand-${{ matrix.os }}
75+
- name: Upload binaries
76+
uses: actions/upload-artifact@v4
77+
with:
78+
name: sysand-cli-${{ matrix.os }}
79+
path: dist/*
80+
81+
nightly-release:
82+
name: Nightly Release
83+
runs-on: ubuntu-latest
84+
needs: [build]
85+
permissions:
86+
# Use to sign the release artifacts
87+
id-token: write
88+
# Used to upload release artifacts
89+
contents: write
90+
# Used to generate artifact attestation
91+
attestations: write
92+
steps:
93+
- uses: actions/download-artifact@v5
94+
with:
95+
path: artifacts
96+
merge-multiple: true
97+
- name: Generate artifact attestation
98+
uses: actions/attest-build-provenance@v2
99+
with:
100+
subject-path: 'artifacts/*'
101+
- name: Rename artifacts
102+
shell: bash
103+
run: |
104+
mv artifacts/sysand-ubuntu-22.04 artifacts/sysand-linux-x86_64
105+
mv artifacts/sysand-ubuntu-24.04-arm artifacts/sysand-linux-arm64
106+
mv artifacts/sysand-windows-latest.exe artifacts/sysand-windows-x86_64.exe
107+
mv artifacts/sysand-windows-11-arm.exe artifacts/sysand-windows-arm64.exe
108+
mv artifacts/sysand-macos-13 artifacts/sysand-macos-x86_64
109+
mv artifacts/sysand-macos-latest artifacts/sysand-macos-arm64
110+
- name: Create release tag
111+
shell: bash
112+
run: echo "TAG_NAME=$(date +v-%Y-%m-%d-%H%M)" >> $GITHUB_ENV
113+
- name: Create a nightly release
114+
uses: softprops/action-gh-release@v2
115+
with:
116+
prerelease: true
117+
files: |
118+
artifacts/*
119+
overwrite_files: false
120+
tag_name: ${{ env.TAG_NAME }}
121+
name: Nightly Release ${{ env.TAG_NAME }}
122+
123+
release:
124+
name: Release
125+
runs-on: ubuntu-latest
126+
needs: [build]
127+
permissions:
128+
# Use to sign the release artifacts
129+
id-token: write
130+
# Used to upload release artifacts
131+
contents: write
132+
# Used to generate artifact attestation
133+
attestations: write
134+
steps:
135+
- uses: actions/download-artifact@v5
136+
with:
137+
path: artifacts
138+
merge-multiple: true
139+
- name: Generate artifact attestation
140+
uses: actions/attest-build-provenance@v2
141+
with:
142+
subject-path: 'artifacts/*'
143+
- name: Rename artifacts
144+
shell: bash
145+
run: |
146+
mv artifacts/sysand-ubuntu-22.04 artifacts/sysand-linux-x86_64
147+
mv artifacts/sysand-ubuntu-24.04-arm artifacts/sysand-linux-arm64
148+
mv artifacts/sysand-windows-latest.exe artifacts/sysand-windows-x86_64.exe
149+
mv artifacts/sysand-windows-11-arm.exe artifacts/sysand-windows-arm64.exe
150+
mv artifacts/sysand-macos-13 artifacts/sysand-macos-x86_64
151+
mv artifacts/sysand-macos-latest artifacts/sysand-macos-arm64
152+
- name: Create a release
153+
uses: softprops/action-gh-release@v2
154+
with:
155+
make_latest: true
156+
files: |
157+
artifacts/*
158+
overwrite_files: false
159+
tag_name: v0.0.1
160+
name: Release v0.0.1
161+
# name: Release ${{ github.event.inputs.tag_name }}

0 commit comments

Comments
 (0)