-
Notifications
You must be signed in to change notification settings - Fork 0
[FEAT] CI/CD for numscript release #86b37qfxt #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
8a765f3
feat: nix flake for numscript wask with tiny go
debora-be 5bebea5
feat: numscript-wasm github pipeline
debora-be 7d92f45
feat: add wasm build pipeline and dev env config
debora-be a450c05
Merge branch 'main' into feat/ci-cd-for-numscript#86b37qfxt
debora-be 4484331
feat: update release
debora-be ce0d9bc
feat: exact go version for testing with act
debora-be 73ae6a3
feat: script for downloading wasm
debora-be ae223e8
chore: adjust .gitignore
debora-be f2e669d
feat: nix workflow
debora-be e583886
chore: apply suggestions from code review
debora-be 5973823
chore: apply review suggestions
debora-be 15b662c
chore: merge main
debora-be 0a02fac
Merge main
Vinocis ea12888
Fix module name
Vinocis 66a9a6c
Fix release CI
Vinocis 9813bf1
Merge branch 'main' into feat/ci-cd-for-numscript#86b37qfxt
Vinocis dbf01cd
Fix build
Vinocis d5910d5
Fix module name on 'numscript.go'
Vinocis 60c0bbd
Run go mod tidy
Vinocis 3ba3ecc
Fix module name on 'numscript_test.go'
Vinocis c4da050
chore: improve nix ci
debora-be 217c168
chore: fix nodejs version
debora-be b3c33d9
chore: fix build
debora-be dbf6104
feat: configure with matrix
debora-be 6aea37e
Remove snapshot flag on release workflow
Vinocis 52be60c
Put version on binary name
Vinocis 20d12fb
Revert last commit
Vinocis c72056d
Remove unused script
Vinocis 2ffba76
Rename release tar.gz file
Vinocis 5d7928d
Archive just the binary on release
Vinocis bbe73a5
Strip unused features off of the binary
Vinocis d4443c9
Download TinyGo deb file on tmp dir
Vinocis 564f0e4
Revert changes from commit '5973823'
Vinocis 6c5efa4
update flake.nix
debora-be 9abb84f
Now TinyGo builds with target flag instead of GOOS and GOARCH vars
Vinocis File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| use flake |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| name: Nix CI | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ main ] | ||
| pull_request: | ||
| branches: [ main ] | ||
|
|
||
| jobs: | ||
| configure: | ||
| runs-on: ubuntu-latest | ||
| outputs: | ||
| matrix: ${{ steps.set-matrix.outputs.matrix }} | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - id: set-matrix | ||
| run: echo "matrix=$(nixci gh-matrix --systems=x86_64-linux,aarch64-darwin | jq -c .)" >> $GITHUB_OUTPUT | ||
|
|
||
| nix: | ||
| runs-on: ${{ matrix.system }} | ||
| permissions: | ||
| contents: read | ||
| needs: configure | ||
| strategy: | ||
| matrix: ${{ fromJson(needs.configure.outputs.matrix) }} | ||
| fail-fast: false | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - run: | | ||
| nixci \ | ||
| --extra-access-tokens "github.com=${{ secrets.GITHUB_TOKEN }}" \ | ||
| build \ | ||
| --systems "${{ matrix.system }}" \ | ||
| .#default.${{ matrix.subflake}} | ||
|
|
||
| - name: Upload artifact | ||
| uses: actions/upload-artifact@v3 | ||
| with: | ||
| name: numscript-wasm-${{ matrix.system }} | ||
| path: build/numscript.wasm |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,31 +1,48 @@ | ||
| name: release | ||
| name: Release | ||
|
|
||
| on: | ||
| release: | ||
| types: [created] | ||
|
|
||
| permissions: | ||
| contents: write | ||
|
|
||
| jobs: | ||
| build: | ||
| release: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/setup-go@v2 | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| go-version: "1.22" | ||
| - uses: actions/checkout@v2 | ||
| - uses: actions/cache@v2 | ||
| fetch-depth: 0 | ||
|
|
||
| - uses: actions/cache@v3 | ||
| with: | ||
| path: | | ||
| ~/.cache/go-build | ||
| ~/go/pkg/mod | ||
| key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | ||
| path: /tmp/.cache | ||
| key: ${{ runner.os }}-build-${{ github.sha }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-go- | ||
| - name: get deps | ||
| run: go mod download | ||
| ${{ runner.os }}-build- | ||
|
|
||
| - name: Set up Go | ||
| uses: actions/setup-go@v4 | ||
| with: | ||
| go-version: "1.22" | ||
| cache: true | ||
|
|
||
| - name: Install TinyGo | ||
| run: | | ||
| wget -P tmp/ https://github.com/tinygo-org/tinygo/releases/download/v0.34.0/tinygo_0.34.0_amd64.deb | ||
| sudo dpkg -i tmp/tinygo_0.34.0_amd64.deb | ||
|
|
||
| - name: Get dependencies | ||
| run: | | ||
| go mod download | ||
| go mod verify | ||
|
|
||
| - name: Run GoReleaser | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| uses: goreleaser/goreleaser-action@v6 | ||
| with: | ||
| distribution: goreleaser | ||
| version: latest | ||
| args: release | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
fermuch marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| { | ||
| description = "A Nix flake for NumScript WASM compilation"; | ||
|
|
||
| inputs = { | ||
| nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; | ||
| flake-utils.url = "github:numtide/flake-utils"; | ||
| }; | ||
|
|
||
| outputs = { self, nixpkgs, flake-utils }: | ||
| flake-utils.lib.eachDefaultSystem (system: | ||
| let | ||
| inherit (pkgs.lib) optional optionals; | ||
| pkgs = import nixpkgs { inherit system; }; | ||
|
|
||
| inputs = with pkgs; [ | ||
| go | ||
| tinygo | ||
| git | ||
| just | ||
| ] ++ optional stdenv.isLinux inotify-tools | ||
| ++ optionals stdenv.isDarwin | ||
| (with darwin.apple_sdk.frameworks; [ CoreFoundation CoreServices ]); | ||
|
|
||
| in with pkgs; { | ||
| devShells.default = mkShell { | ||
| name = "numscript-wasm"; | ||
| packages = inputs; | ||
|
|
||
| shellHook = '' | ||
| echo "NumScript WASM development environment" | ||
| echo "TinyGo version: $(tinygo version)" | ||
| echo "Go version: $(go version)" | ||
| ''; | ||
| }; | ||
| }); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.